Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problème import champs additionnels #502

Open
MoulinZ opened this issue Mar 6, 2024 · 0 comments
Open

Problème import champs additionnels #502

MoulinZ opened this issue Mar 6, 2024 · 0 comments
Assignees

Comments

@MoulinZ
Copy link

MoulinZ commented Mar 6, 2024

GeoNature 2.13.2, Module Import 2.2.3

Bonjour,

J'ai une erreur à l'étape du mapping des champs, un de mes champs additionnels ne passe pas. Si je l'enlève, plus de problème ça passe pour les autres. Il se trouve que mon champ est vide pour tous les enregistrements, mais ça ne doit pas être ça le problème puisqu'un autre champ vide passe. Je ne comprend pas l'erreur suivante décrite dans les logs :

[2024-03-06 14:56:28 +0100] [2567115] [ERROR] Exception on /import/imports/143/load [POST]
Traceback (most recent call last):
  File "/home/geonatureadmin/geonature/backend/venv/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/geonatureadmin/geonature/backend/venv/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/home/geonatureadmin/geonature/backend/geonature/core/gn_permissions/decorators.py", line 62, in decorated_view
    return view_func(*args, **kwargs)
  File "/home/geonatureadmin/gn_module_import/backend/gn_module_import/routes/imports.py", line 313, in load_import
    line_no = insert_import_data_in_database(imprt)
  File "/home/geonatureadmin/gn_module_import/backend/gn_module_import/utils.py", line 154, in insert_import_data_in_database
    {
  File "/home/geonatureadmin/gn_module_import/backend/gn_module_import/utils.py", line 156, in <dictcomp>
    build_additional_data(row, source_field["value"])
  File "/home/geonatureadmin/gn_module_import/backend/gn_module_import/utils.py", line 182, in build_additional_data
    result.update(ast.literal_eval(row[column]))
ValueError: dictionary update sequence element #0 has length 14; 2 is required

L'erreur n'est pas bloquante vu que le champs était vide je l'ai supprimé, mais j'aimerai comprendre ce qui posait problème. Merci !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants