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

Add error handling for WMS client #213

Closed
joker234 opened this issue Feb 10, 2023 · 0 comments · Fixed by #227
Closed

Add error handling for WMS client #213

joker234 opened this issue Feb 10, 2023 · 0 comments · Fixed by #227
Assignees

Comments

@joker234
Copy link
Member

This error happened probably because of issues in the tile server and should be handled correctly in SMT.

sketch-map-tool-celery-1    | [2023-02-10 10:29:30,206: ERROR/ForkPoolWorker-5] Task sketch_map_tool.tasks.generate_sketch_map[49cbe1bc-9598-4bef-ae16-b76f8f3ec485] raised unexpected: UnidentifiedImageError('cannot identify image file <_io.BytesIO object at 0x7f7487b948b0>')
sketch-map-tool-celery-1    | Traceback (most recent call last):
sketch-map-tool-celery-1    |   File "/home/smt/.cache/pypoetry/virtualenvs/sketch-map-tool-7oog9W5A-py3.10/lib/python3.10/site-packages/celery/app/trace.py", line 451, in trace_task
sketch-map-tool-celery-1    |     R = retval = fun(*args, **kwargs)
sketch-map-tool-celery-1    |   File "/opt/smt/sketch_map_tool/__init__.py", line 46, in __call__
sketch-map-tool-celery-1    |     return self.run(*args, **kwargs)
sketch-map-tool-celery-1    |   File "/opt/smt/sketch_map_tool/tasks.py", line 51, in generate_sketch_map
sketch-map-tool-celery-1    |     map_image = wms_client.as_image(raw)
sketch-map-tool-celery-1    |   File "/opt/smt/sketch_map_tool/wms/client.py", line 48, in as_image
sketch-map-tool-celery-1    |     return Image.open(response.raw)
sketch-map-tool-celery-1    |   File "/home/smt/.cache/pypoetry/virtualenvs/sketch-map-tool-7oog9W5A-py3.10/lib/python3.10/site-packages/PIL/Image.py", line 3186, in open
sketch-map-tool-celery-1    |     raise UnidentifiedImageError(
sketch-map-tool-celery-1    | PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f7487b948b0>
@mhhd2020 mhhd2020 self-assigned this Feb 28, 2023
@mhhd2020 mhhd2020 linked a pull request Feb 28, 2023 that will close this issue
mhhd2020 added a commit that referenced this issue Mar 22, 2023
Co-authored-by: Matthias Schaub <83658582+matthiasschaub@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

2 participants