Tâche #15784
Distribution EOLE - Scénario #16962: Traitement express MEN (36-38)
Message d'erreur dans gen_config lorsqu'on réinitialise une variable à sa valeur par défaut
Status:
Fermé
Priority:
Normal
Assigned To:
Target version:
Remaining (hours):
0.0
Description
message d'erreur furtif 'unicode' object has no attribute 'cfgimpl_get_description'
Cf capture d'écran jointe.
Log de gen_config : tail -50 /var/log/eoleflask/eolegenconfig.log
AttributeError: 'unicode' object has no attribute 'cfgimpl_get_description' 2016-04-05 15:05:23,559: eolegenconfig - 'unicode' object has no attribute 'cfgimpl_get_description' Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/eolegenconfig/webapi.py", line 237, in reset_variable lib.reset_value(lib.get_id(), category_name, master_name, variable_name) File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 802, in reset_value option = config.unwrap_from_path(path) File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 529, in unwrap_from_path return getattr(homeconfig.cfgimpl_get_description(), path)
Reproduction du bug
root@scribe:~# python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from creole.loader import creole_loader >>> c=creole_loader() >>> path = "creole.glpi.glpi_helpdesk_doc_url.glpi_helpdesk_doc_url" >>> config=creole_loader(rw=True) >>> option = config.unwrap_from_path(path) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 528, in unwrap_from_path path, force_permissive=force_permissive) File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 72, in cfgimpl_get_home_by_path force_properties=force_properties) File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 268, in getattr force_permissives=force_permissives) File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 187, in getitem force_permissives) File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 281, in _getitem force_permissives=force_permissives) File "/usr/lib/python2.7/dist-packages/tiramisu/setting.py", line 511, in validate_properties str(props)), props) tiramisu.error.PropertiesOptionError: tentative d'accès à une option nommée : glpi_helpdesk_doc_url avec les propriétés ['disabled']
>>> config.creole.glpi.glpi_helpdesk_doc_source = u'personnalisée'
>>> config.creole.glpi glpi_config_email = ne rien faire glpi_ldap_auth = ne rien faire glpi_cas_auth = oui glpi_db_mode = default glpi_helpdesk_doc_source = personnalisée glpi_helpdesk_doc_url = http://pne.metier.e2.rie.gouv.fr/glpi-r677.html glpi_central_doc_source = officielle
>>> config.creole.glpi.glpi_helpdesk_doc_url u'http://pne.metier.e2.rie.gouv.fr/glpi-r677.html'
>>> config.creole.glpi.glpi_helpdesk_doc_url.glpi_helpdesk_doc_url Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'unicode' object has no attribute 'glpi_helpdesk_doc_url' >>>
Copie de l'inspecteur coté navigateur
{name: null, description: "URL de l'aide helpdesk", mandatory: false, multi: false, masters: [],…} _value : "http://pne.metier.e2.rie.gouv.fr/glpi-r677.html" auto_freeze : false category : {name: "Category Name", help: "Paramétrage avancé de l'application GLPI", mode: "basic",…} categoryid : "glpi" default_owner : true description : "URL de l'aide helpdesk" editable : true error : null group : null groupid : "glpi_helpdesk_doc_url" help : "URL personnalisée de la documentation helpdesk accessible depuis l'application glpi." hidden : false id : "glpi_helpdesk_doc_url"
Dans notre cas et d'après manu, la valeur du groupid devrait être null.
Associated revisions
reset : possible confusion entre plusieurs noms de classes, fait une erreur à la suppression du reset (ref #15784 @7h)
History
#1 Updated by Gérald Schwartzmann over 7 years ago
- Subject changed from message d'erreur furtif 'unicode' object has no attribute 'cfgimpl_get_description' to Message d'erreur dans gen_config lorsqu'on réinitialise une variable à sa valeur par défaut
- Description updated (diff)
#2 Updated by Joël Cuissinat about 7 years ago
- Parent task set to #16962
#3 Updated by Joël Cuissinat about 7 years ago
- Remaining (hours) set to 3.0
#4 Updated by Emmanuel GARETTE about 7 years ago
- Assigned To set to Emmanuel GARETTE
#5 Updated by Emmanuel GARETTE about 7 years ago
- Status changed from Nouveau to En cours
#6 Updated by Emmanuel GARETTE about 7 years ago
- % Done changed from 0 to 100
- Remaining (hours) changed from 3.0 to 0.25
#7 Updated by Scrum Master about 7 years ago
- Status changed from En cours to Résolu
#8 Updated by Laurent Flori about 7 years ago
- Status changed from Résolu to Fermé
- Remaining (hours) changed from 0.25 to 0.0