Infinite loop: non-utf-8 character in a tag #19
Bordasludovic
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Mercure Team! ,
I sometimes get an error that seems to be linked to an "illegal" non-utf-8 character in a tag (unfortunately I didn't specify which one) that breaks the python script when it is executed.
Unfortunately, Mercure seems to insist on endlessly processing this file until I manually delete it from the server.
Could you add a rule so that Mercury rejects this file and stops processing it in an infinite loop?
Oct 20 14:30:02 tlg-dcomr03 python[690]: ERROR route_series: Invalid tag for series 1.2.826.0.1.3680043.9.7508.123878311813799876700829750749402624 [task: 641db566-6f44-11ee-baca-005056aeb3fd]
Oct 20 14:30:02 tlg-dcomr03 python[690]: Traceback (most recent call last):
Oct 20 14:30:02 tlg-dcomr03 python[690]: File "/opt/mercure/app/routing/route_series.py", line 87, in route_series
Oct 20 14:30:02 tlg-dcomr03 python[690]: tagsList: Dict[str, str] = json.load(json_file)
Oct 20 14:30:02 tlg-dcomr03 python[690]: File "/usr/lib/python3.10/json/init.py", line 293, in load
Oct 20 14:30:02 tlg-dcomr03 python[690]: return loads(fp.read(),
Oct 20 14:30:02 tlg-dcomr03 python[690]: File "/usr/lib/python3.10/codecs.py", line 322, in decode
Oct 20 14:30:02 tlg-dcomr03 python[690]: (result, consumed) = self._buffer_decode(data, self.errors, final)
Oct 20 14:30:02 tlg-dcomr03 python[690]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 261: invalid continuation byte
Oct 20 14:30:02 tlg-dcomr03 python[690]: INFO route_series: Processing series 1.2.826.0.1.3680043.9.7508.124737466579422254418847686766880256 [task: 641f8512-6f44-11ee-baca-005056aeb3fd]
Oct 20 14:30:02 tlg-dcomr03 python[640]: INFO: 127.0.0.1:41812 - "POST /register-dicom HTTP/1.1" 200 OK
Beta Was this translation helpful? Give feedback.
All reactions