EdwardBetts / depicts

Wiki Art Depiction Explorer
https://art.wikidata.link/
GNU General Public License v3.0
4 stars 3 forks source link

error trying to access image detail for Q17276135 #23

Closed EdwardBetts closed 4 years ago

EdwardBetts commented 4 years ago

URL: http://art.wikidata.link/item/Q17276135

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/srv/depicts/app.py", line 370, in item_page
    image = image_with_cache(qid, image_filename, width)
  File "/srv/depicts/app.py", line 321, in image_with_cache
    return detail[image_filename]
KeyError: 'Gerard ter Borch - Portrait of Cornelis de Graeff (1650-1678) - 489 - Mauritshuis.jpg'
EdwardBetts commented 4 years ago

This is fixed by refreshing the cache if the image name has changed.