This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
500 error "min() arg is an empty sequence" when requesting a thumbnail #5117
Closed
Description
Description
Looking at the logfile for my homeserver, I see the the following error message pop up fairly frequently:
2019-05-01 14:12:25,452 - synapse.http.server - 112 - ERROR - GET-38086 - Failed handle request via 'ThumbnailResource': <XForwardedForRequest at 0x7fe3dd9286a0 method='GET' uri='/_matrix/media/v1/thumbnail/raim.ist/KthgQjZpYLHEVOIzwvTjkXPx?width=150&height=150&method=scale' clientproto='HTTP/1.0' site=8008>
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/usr/lib/python3.6/site-packages/synapse/storage/_base.py", line 460, in runWithConnection
defer.returnValue(result)
File "/usr/lib/python3.6/site-packages/twisted/internet/defer.py", line 1362, in returnValue
raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: [{'thumbnail_width': 10, 'thumbnail_height': 10, 'thumbnail_method': 'crop', 'thumbnail_type': 'image/jpeg', 'thumbnail_length': 715, 'filesystem_id': 'ZsQNhbXXFdIhkmfWZvdvlAww'}]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/usr/lib/python3.6/site-packages/synapse/storage/_base.py", line 418, in runInteraction
defer.returnValue(result)
File "/usr/lib/python3.6/site-packages/twisted/internet/defer.py", line 1362, in returnValue
raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: [{'thumbnail_width': 10, 'thumbnail_height': 10, 'thumbnail_method': 'crop', 'thumbnail_type': 'image/jpeg', 'thumbnail_length': 715, 'filesystem_id': 'ZsQNhbXXFdIhkmfWZvdvlAww'}]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
yield h(self, request)
File "/usr/lib/python3.6/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3.6/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/python3.6/site-packages/synapse/rest/media/v1/thumbnail_resource.py", line 83, in _async_render_GET
width, height, method, m_type
File "/usr/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/usr/lib/python3.6/site-packages/synapse/rest/media/v1/thumbnail_resource.py", line 244, in _respond_remote_thumbnail
width, height, method, m_type, thumbnail_infos
File "/usr/lib/python3.6/site-packages/synapse/rest/media/v1/thumbnail_resource.py", line 317, in _select_thumbnail
return min(info_list2)[-1]
ValueError: min() arg is an empty sequence
There are 10s of such messages every day.
Steps to reproduce
I don't currently know what action can cause this error.
Version information
- Homeserver: My own HS
If not matrix.org:
-
Version: 0.99.3
-
Install method: pip3
- Platform:
Running inside a Alpine Linux LXC container on a Arch Linux host