LibrePhotos / librephotos

A self-hosted open source photo management service. This is the repository of the backend.
MIT License
7.01k stars 309 forks source link

Thumbnails unavailable #72

Closed bendamschke closed 3 years ago

bendamschke commented 3 years ago

Steps to reproduce:

Screenshot_20210102_000320

System:

Logs:

django.db.utils.IntegrityError: duplicate key value violates unique constraint "api_photo_pkey"
DETAIL:  Key (image_hash)=(c603b80d05b6271a6d0bd9b83t8d1eda2) already exists.
Traceback (most recent call last):
  File "/code/api/directory_watcher.py", line 69, in handle_new_image
    photo._generate_thumbnail()
  File "/code/api/models.py", line 252, in _generate_thumbnail
    if not os.path.exists(self.thumbnail_big.url):
  File "/miniconda/lib/python3.8/site-packages/django/db/models/fields/files.py", line 61, in url
    self._require_file()
  File "/miniconda/lib/python3.8/site-packages/django/db/models/fields/files.py", line 38, in _require_file
    raise ValueError("The '%s' attribute has no file associated with it." % self.field.name)
ValueError: The 'thumbnail_big' attribute has no file associated with it.
derneuere commented 3 years ago

I pushed a new docker image. I would recommend to start with a new database, if you don't have any data correctly imported yet. Currently, only the thumbnail and the date are created on a rescan, if something is missing or changed. If you already have important data scanned, I will fix it, but it will take me some time to implement a rescan for all features.

bendamschke commented 3 years ago

As of 7049a8c0c5302a3ea116ec191628fb6b27ab8c59, this issue has been resolved. Closing.