LabelsTower issueshttps://gitlab.in2p3.fr/MaitresNageurs/README/LabelsTower/-/issues2020-07-28T10:16:15+02:00https://gitlab.in2p3.fr/MaitresNageurs/README/LabelsTower/-/issues/41Modifier l'image DOCKER2020-07-28T10:16:15+02:00Elliot RichardModifier l'image DOCKERrequirements.txt à évolué.
Il faut donc mettre à jour l'image distante de labelsTower afin de télécharger les bonnes dépendances (requirements.txt)requirements.txt à évolué.
Il faut donc mettre à jour l'image distante de labelsTower afin de télécharger les bonnes dépendances (requirements.txt)Elliot RichardElliot Richardhttps://gitlab.in2p3.fr/MaitresNageurs/README/LabelsTower/-/issues/42fix bug : ImportError: module 'demo.config' has no attribute 'Config'2020-07-28T16:34:46+02:00Elliot Richardfix bug : ImportError: module 'demo.config' has no attribute 'Config'erichard@nb-erichard:~/Developpement/LabelsTower.git$ docker/run_latest.sh instance/init_db.sh
LABELSTOWER_ENV demo.config.Config
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/werkzeug/utils.py", lin...erichard@nb-erichard:~/Developpement/LabelsTower.git$ docker/run_latest.sh instance/init_db.sh
LABELSTOWER_ENV demo.config.Config
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/werkzeug/utils.py", line 556, in import_string
return getattr(module, obj_name)
AttributeError: module 'demo.config' has no attribute 'Config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/werkzeug/utils.py", line 558, in import_string
raise ImportError(e)
ImportError: module 'demo.config' has no attribute 'Config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/work/demo/__init__.py", line 23, in create_app
app.config.from_object(os.environ['LABELSTOWER_ENV'])
File "/usr/local/lib/python3.6/site-packages/flask/config.py", line 174, in from_object
obj = import_string(obj)
File "/usr/local/lib/python3.6/site-packages/werkzeug/utils.py", line 563, in import_string
ImportStringError, ImportStringError(import_name, e), sys.exc_info()[2]
File "/usr/local/lib/python3.6/site-packages/werkzeug/_compat.py", line 147, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/werkzeug/utils.py", line 558, in import_string
raise ImportError(e)
werkzeug.utils.ImportStringError: import_string() failed for 'demo.config.Config'. Possible reasons are:
- missing __init__.py in a package;
- package or module path not included in sys.path;
- duplicated package or module name taking precedence in sys.path;
- missing module, class, function or variable;
Debugged import:
- 'demo' found in '/work/demo/__init__.py'.
- 'demo.config' found in '/work/demo/config.py'.
- 'demo.config.Config' not found.
Original exception:
ImportError: module 'demo.config' has no attribute 'Config'
Error: cannot open "Data.sql"Elliot RichardElliot Richardhttps://gitlab.in2p3.fr/MaitresNageurs/README/LabelsTower/-/issues/43fix bug : KeyError: 'LABELSTOWER_ENV'2020-07-28T16:34:27+02:00Elliot Richardfix bug : KeyError: 'LABELSTOWER_ENV'root@90baf65dd181:/work# flask run --host 0.0.0.0
* Serving Flask app "demo"
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debu...root@90baf65dd181:/work# flask run --host 0.0.0.0
* Serving Flask app "demo"
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
Traceback (most recent call last):
File "/usr/local/bin/flask", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 966, in main
cli.main(prog_name="python -m flask" if as_module else None)
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 848, in run_command
app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 305, in __init__
self._load_unlocked()
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 330, in _load_unlocked
self._app = rv = self.loader()
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 388, in load_app
app = locate_app(self, import_name, name)
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 257, in locate_app
return find_best_app(script_info, module)
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 83, in find_best_app
app = call_factory(script_info, app_factory)
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 119, in call_factory
return app_factory()
File "/work/demo/__init__.py", line 23, in create_app
app.config.from_object(os.environ['LABELSTOWER_ENV'])
File "/usr/local/lib/python3.6/os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'LABELSTOWER_ENV'Elliot RichardElliot Richardhttps://gitlab.in2p3.fr/MaitresNageurs/README/LabelsTower/-/issues/44Refactor search route2020-08-03T11:36:53+02:00Elliot RichardRefactor search routeProblème :
Lorsque nous remplaçons les attributs du SELECT du SQL statement de la fonction get_selected_elements par * le système
de tri par étiquette cesse de fonctionner correctement (/test/script/run_doctest.sh ***Test Faile...Problème :
Lorsque nous remplaçons les attributs du SELECT du SQL statement de la fonction get_selected_elements par * le système
de tri par étiquette cesse de fonctionner correctement (/test/script/run_doctest.sh ***Test Failed*** 6 failures.).
Origine :
Elles sont multiple.
Si number_of_mandatory_labels > 0
Le FROM utilise les tables LABEL et ELEMENT qui possèdent chacun un attribut id. La table qui apparaît en
premier dans le
FROM voit son id disparaître (comportement avec le SGBD sqlite3).
De plus get_selected_elements renvoie les attributs de la table ELEMENT et les attributs des tables jointes
(LABEL et
ELEMENT_LABEL)
Si number_of_mandatory_labels <= 0
La jointure entre ELEMENT et ELEMENT_LABEL crée des doublons chez les éléments qui portent plus d'un label.
Solution :
Elles sont multiple.
Si number_of_mandatory_labels > 0
1. Supprimer la jointure avec LABEL car les id des labels sont déjà disponibles avec la table ELEMENT_LABEL
(id_element,
id_label).
2. Selectionner uniquement les attributs de la table ELEMENT (SELECT ELEMENT.*).
Si number_of_mandatory_labels <= 0
1. Garder le DISCTINCT dans le SELECT (SELECT DISTINCT ELEMENT.id, ELEMENT.*
2. Ajouter une CLAUSE GROUP BY (GROUP BY ELEMENT.id)Elliot RichardElliot Richardhttps://gitlab.in2p3.fr/MaitresNageurs/README/LabelsTower/-/issues/45cookie management regration2020-08-03T14:13:45+02:00Elliot Richardcookie management regrationProblème :
Lorsque je rafraichis la page de démo et que des labels ont été sélectionnés,
le panneau des labels discriminants est vide alors qu'il ne le devrait pas.
Origine :
La méthode str_to_labels_tab crée un nom de c...Problème :
Lorsque je rafraichis la page de démo et que des labels ont été sélectionnés,
le panneau des labels discriminants est vide alors qu'il ne le devrait pas.
Origine :
La méthode str_to_labels_tab crée un nom de clé qui ne correspondant pas aux noms de clés utilisées
dans templates/browser.html.
La méthode labels_tab_to_str lit un nom de clé inexistant ("name").
Solution :
Mettre à jour le nom de clé name ("name" -> "label_name").Elliot RichardElliot Richard