HERMES : Erreur lors de la simulation de détection
Dsniss opened this issue · 6 comments
**Bonjour @Ousret
**Avec la version 1.09 lorsque je glisse un mail (copié au préalable sur mon bureau ou en provenance d'Outllook) dans la partie simulation de détection j'ai une erreur à l'écran. (cf. mail concerné en PJ) Merci pour ton aide. Bonne journée. @Dsniss
NOTIF_VRIFDELAI Verif si demandes depassent delai et alerter demandeurs.zip
Analyse de message
×
ValueError
ValueError: dictionary update sequence element #2 has length 19; 2 is required
Traceback (most recent call last)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2328, in call
return self.wsgi_app(environ, start_response)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2314, in wsgi_app
response = self.handle_exception(e)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1760, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/itop/.local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/itop/.local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/itop/.local/lib/python3.7/site-packages/Flask_Login-0.4.1-py3.7.egg/flask_login/utils.py", line 261, in decorated_view
return func(*args, **kwargs)
File "/home/itop/hermes/hermes_ui/app.py", line 576, in simulation_detecteur_fichier
mon_message = Mail.from_msg(mon_fichier.stream.read())
File "/home/itop/hermes/hermes/mail.py", line 205, in from_msg
'utf-8'
File "/home/itop/hermes/hermes/mail.py", line 190, in from_eml
email.message_from_bytes(eml_content)
File "/home/itop/hermes/hermes/mail.py", line 250, in from_message
el.split('=') for el in [el.lstrip() for el in message_part_header_value.split(';')] if
ValueError: dictionary update sequence element #2 has length 19; 2 is required
This is the Copy/Paste friendly version of the traceback. You can also paste this traceback into a gist:
Traceback (most recent call last):
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2328, in call
return self.wsgi_app(environ, start_response)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2314, in wsgi_app
response = self.handle_exception(e)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1760, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/itop/.local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/itop/.local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/itop/.local/lib/python3.7/site-packages/Flask_Login-0.4.1-py3.7.egg/flask_login/utils.py", line 261, in decorated_view
return func(*args, **kwargs)
File "/home/itop/hermes/hermes_ui/app.py", line 576, in simulation_detecteur_fichier
mon_message = Mail.from_msg(mon_fichier.stream.read())
File "/home/itop/hermes/hermes/mail.py", line 205, in from_msg
'utf-8'
File "/home/itop/hermes/hermes/mail.py", line 190, in from_eml
email.message_from_bytes(eml_content)
File "/home/itop/hermes/hermes/mail.py", line 250, in from_message
el.split('=') for el in [el.lstrip() for el in message_part_header_value.split(';')] if
ValueError: dictionary update sequence element #2 has length 19; 2 is required
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.
Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter
Bonjour @Dsniss
Un correctif est disponible dans la version 1.0.10, ce problème provenait bien d'hermès.
Cette mise à jour va nécessiter que tu lances le script ./upgrade.sh
deux fois. Ceci est important. J'ai dû rajouter une dépendance externe pour résoudre ce problème.
Bien à toi
Bonjour @Ousret
Après avoir installé la nouvelle version 1.0.10 et fait un essai avec le même mail en entrée, je constate toujours une erreur .
ValueError
ValueError: string argument should contain only ASCII characters
Traceback (most recent call last)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2328, in call
return self.wsgi_app(environ, start_response)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2314, in wsgi_app
response = self.handle_exception(e)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1760, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/itop/.local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/itop/.local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/itop/.local/lib/python3.7/site-packages/Flask_Login-0.4.1-py3.7.egg/flask_login/utils.py", line 261, in decorated_view
return func(*args, **kwargs)
File "/home/itop/hermes/hermes_ui/app.py", line 576, in simulation_detecteur_fichier
mon_message = Mail.from_msg(mon_fichier.stream.read())
File "/home/itop/hermes/hermes/mail.py", line 203, in from_msg
'utf-8'
File "/home/itop/hermes/hermes/mail.py", line 188, in from_eml
email.message_from_bytes(eml_content)
File "/home/itop/hermes/hermes/mail.py", line 249, in from_message
sub_concerned_body = decodestring(sub_concerned_body).decode(sub_charset_declared if sub_charset_declared else 'utf-8', errors='ignore')
File "/usr/local/lib/python3.7/quopri.py", line 162, in decodestring
return a2b_qp(s, header=header)
ValueError: string argument should contain only ASCII characters
This is the Copy/Paste friendly version of the traceback. You can also paste this traceback into a gist:
Traceback (most recent call last):
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2328, in call
return self.wsgi_app(environ, start_response)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2314, in wsgi_app
response = self.handle_exception(e)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1760, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/itop/.local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/itop/.local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/home/itop/.local/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/itop/.local/lib/python3.7/site-packages/Flask_Login-0.4.1-py3.7.egg/flask_login/utils.py", line 261, in decorated_view
return func(*args, **kwargs)
File "/home/itop/hermes/hermes_ui/app.py", line 576, in simulation_detecteur_fichier
mon_message = Mail.from_msg(mon_fichier.stream.read())
File "/home/itop/hermes/hermes/mail.py", line 203, in from_msg
'utf-8'
File "/home/itop/hermes/hermes/mail.py", line 188, in from_eml
email.message_from_bytes(eml_content)
File "/home/itop/hermes/hermes/mail.py", line 249, in from_message
sub_concerned_body = decodestring(sub_concerned_body).decode(sub_charset_declared if sub_charset_declared else 'utf-8', errors='ignore')
File "/usr/local/lib/python3.7/quopri.py", line 162, in decodestring
return a2b_qp(s, header=header)
ValueError: string argument should contain only ASCII characters
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.
ça doit être bon, relance ./upgrade.sh