Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Thumbnails not generating #2399

Closed
tkolo opened this issue Aug 1, 2017 · 3 comments
Closed

Thumbnails not generating #2399

tkolo opened this issue Aug 1, 2017 · 3 comments

Comments

@tkolo
Copy link

tkolo commented Aug 1, 2017

Dynamic thumbnails do not seem to work for me on latest stable synapse server.
The following error happens on the server:

2017-08-01 23:30:44,477 - synapse.http.server - 139 - ERROR - GET-251446- Failed handle request synapse.rest.media.v1.thumbnail_resource._async_render_GET on <synapse.rest.me
source.ThumbnailResource instance at 0x7f1c89cff488>: <XForwardedForRequest at 0x7f1c8047fa28 method=GET uri=/_matrix/media/v1/thumbnail/kolosowscy.pl/SmBExHmNiwzfKirHWlLuctG
100 clientproto=HTTP/1.0 site=8008>
Traceback (most recent call last):
  File "/srv/synapse/lib/python2.7/site-packages/synapse/http/server.py", line 118, in wrapped_request_handler
    yield request_handler(self, request)
  File "/srv/synapse/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/srv/synapse/lib/python2.7/site-packages/twisted/python/failure.py", line 393, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/srv/synapse/lib/python2.7/site-packages/synapse/rest/media/v1/thumbnail_resource.py", line 61, in _async_render_GET
    request, media_id, width, height, method, m_type
  File "/srv/synapse/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/srv/synapse/lib/python2.7/site-packages/twisted/python/failure.py", line 393, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/srv/synapse/lib/python2.7/site-packages/synapse/rest/media/v1/thumbnail_resource.py", line 163, in _select_or_generate_local_thumbnail
    media_id, desired_width, desired_height, desired_method, desired_type
  File "/srv/synapse/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/srv/synapse/lib/python2.7/site-packages/twisted/python/failure.py", line 393, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/srv/synapse/lib/python2.7/site-packages/synapse/rest/media/v1/media_repository.py", line 294, in generate_local_exact_thumbnail
    input_path, t_path, t_width, t_height, t_method, t_type
  File "/srv/synapse/lib/python2.7/site-packages/twisted/python/threadpool.py", line 250, in inContext
    result = inContext.theWork()
  File "/srv/synapse/lib/python2.7/site-packages/twisted/python/threadpool.py", line 266, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/srv/synapse/lib/python2.7/site-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/srv/synapse/lib/python2.7/site-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/srv/synapse/lib/python2.7/site-packages/synapse/rest/media/v1/media_repository.py", line 258, in _generate_thumbnail
    thumbnailer = Thumbnailer(input_path)
  File "/srv/synapse/lib/python2.7/site-packages/synapse/rest/media/v1/thumbnailer.py", line 32, in __init__
    self.image = Image.open(input_path)
  File "/srv/synapse/lib/python2.7/site-packages/PIL/Image.py", line 2477, in open
    fp = builtins.open(filename, "rb")
IOError: [Errno 2] No such file or directory: '/srv/synapse/media_store/local_content/Sm/BE/xHmNiwzfKirHWlLuctGW'

In riot it looks like so:
image

@jkolo
Copy link
Contributor

jkolo commented Aug 1, 2017

Only dynamic thumbnails for url doesn't work

jkolo added a commit to jkolo/synapse that referenced this issue Aug 1, 2017
@brainbug89
Copy link

Why is the fix for this issue still not pulled to master?!! 🙄

@jkolo
Copy link
Contributor

jkolo commented Apr 23, 2018

@brainbug89 PR #2791 fixed this issue :-)

@tkolo tkolo closed this as completed Apr 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants