Skip to content

Backend: could not load image reason: list index out of range #1268

@nzlov

Description

@nzlov

📝 Description of issue:

backend  | ERROR:ownphotos:job 5629b0ee-3d23-4779-8189-aea609bddf8f: could not load image /data/2019/04/MVIMG_20190420_105230.jpg. reason: list index out of range
backend  | Traceback (most recent call last):
backend  |   File "/code/api/directory_watcher.py", line 247, in rescan_image
backend  |     photo._add_location_to_album_dates()
backend  |   File "/code/api/models/photo.py", line 562, in _add_location_to_album_dates
backend  |     city_name = self.geolocation_json["places"][-2]
backend  |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
backend  | IndexError: list index out of range

Please provide additional information:

  • 💻 Operating system: linux
  • ⚙ Architecture (x86 or ARM): x86
  • 🔢 Librephotos version: 2024w18
  • 📸 Librephotos installation method (Docker, Kubernetes, .deb, etc.): docker
  • 📁 How is you picture library mounted (Local file system (Type), NFS, SMB, etc.): local
version: "3.8"
services:
  proxy:
    image: reallibrephotos/librephotos-proxy:latest
    container_name: librephotos-proxy
    restart: unless-stopped
    volumes:
      - /docs/nextcloud/data/kk/files/Photos:/data/kk
      - /docs/lib/librephotos/protected_media:/protected_media
    ports:
      - 40001:80
    depends_on:
      - backend
      - frontend

  db:
    image: postgres:13
    container_name: librephotos-db
    restart: unless-stopped
    environment:
      - POSTGRES_USER=librephotos
      - POSTGRES_PASSWORD=t20qwf9cjaer
      - POSTGRES_DB=librephotos
    volumes:
      - /docs/lib/librephotos/db:/var/lib/postgresql/data
    command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0

  frontend:
    image: reallibrephotos/librephotos-frontend:latest
    container_name: librephotos-frontend
    restart: unless-stopped
    depends_on:
      - backend

  backend:
    image: reallibrephotos/librephotos:latest
    container_name: backend
    restart: unless-stopped
    volumes:
      - /docs/nextcloud/data/kk/files/Photos:/data/kk
      - /docs/lib/librephotos/protected_media:/protected_media
      - /var/log/librephotos:/logs
      - /var/cache/librephotos:/root/.cache
    environment:
      - SECRET_KEY=
      - BACKEND_HOST=backend
      - DB_BACKEND=postgresql
      - DB_NAME=librephotos
      - DB_USER=librephotos
      - DB_PASS=
      - DB_HOST=librephotos-db
      - DB_PORT=5432
      - REDIS_HOST=librephotos-redis
      - REDIS_PORT=6379
      - DEBUG=0
    # Wait for Postgres
    depends_on:
      - db
      - redis

  redis:
    image: redis:6
    container_name: librephotos-redis
    restart: unless-stopped

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions