loris-imageserver / loris

Loris IIIF Image Server
Other
208 stars 87 forks source link

Error despite enabling tif output #489

Open mdlincoln opened 4 years ago

mdlincoln commented 4 years ago

I've setup loris with tif enabled in the target_formats list, however I get a server error when trying to get that output format on one of the example images:

2019-11-14 17:22:31,288 (werkzeug) [INFO]: 192.168.48.3 - - [14/Nov/2019 17:22:31] "GET /01/02/0001.jp2/1000,1000,1500,1200/full/0/default.tif HTTP/1.0" 500 -
2019-11-14 17:22:31,291 (werkzeug) [ERROR]: Error on request:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 193, in run_wsgi
    execute(self.server.app)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 181, in execute
    application_iter = app(environ, start_response)
  File "/opt/loris/loris/webapp.py", line 360, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/loris/loris/webapp.py", line 254, in wsgi_app
    response = self.route(request)
  File "/opt/loris/loris/webapp.py", line 290, in route
    return self.get_img(request, ident, region, size, rotation, quality, fmt, base_uri)
  File "/opt/loris/loris/webapp.py", line 567, in get_img
    r.last_modified = datetime.utcfromtimestamp(path.getctime(fp))
  File "/usr/lib/python2.7/genericpath.py", line 64, in getctime
    return os.stat(filename).st_ctime
OSError: [Errno 2] No such file or directory: '/var/cache/loris2/01/02/0001.jp2/1000,1000,1500,1200/full/0/default.tif'

JPG and PNG requests work just fine. I'm guessing the conversion is choking somewhere? I've reinstalled Pillow and it confirms that it's got access to libtiff...

bcail commented 4 years ago

@mdlincoln which version of loris are you running? If you're not already, are you able to run the latest code from git and see if it fails there as well? (note that you would need to switch to python3)