LibrePhotos / librephotos

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

Places do not show up on first load / click #535

Open darrepac opened 2 years ago

darrepac commented 2 years ago

Hi

Even if the map is displaying where are all the photos, I can't see any photo below the map... I am running librephoto on docker under Debian. I pulled latest image on June 21 (I don't see any place where I can see the version number in the UI). Here is the screenshot

image

loulou91 commented 2 years ago

I get the same issue since a long time but not always. If I request page refresh (under chrome) photos may appear (but not always). The same if I zoom. Photos may also disappear if I request page refresh. With android User Interface version 0.39 I have no more this type of issues. Last, almost all my 52.000 photos are geolocalized.

derneuere commented 2 years ago

As soon as I scroll around the map, the places are shown to me at the bottom. Do you get any errors in the console, which could help me track down this issue?

loulou91 commented 2 years ago

I just made a test. from scratch, request album-places. I see map but no pictures at bottom. I wait for a bit less that 1 mn and I refresh the page. Photos are now displayed. ownphotos.log says: _""2022-08-11 17:21:40,578 : image_similarity.py : build_image_similarity_index : 64 : INFO : builing similarity index for user admin 2022-08-11 17:23:01,028 : image_similarity.py : build_image_similarity_index : 90 : INFO : builing similarity index took 80.45 seconds 2022-08-11 17:23:01,052 : image_similarity.py : build_image_similarity_index : 64 : INFO : builing similarity index for user deleted 2022-08-11 17:23:01,058 : image_similarity.py : build_image_similarity_index : 90 : INFO : builing similarity index took 0.01 seconds 2022-08-11 17:28:13,990 : api_util.py : get_search_term_examples : 178 : INFO : 100 possible ids 2022-08-11 17:28:13,992 : api_util.py : get_search_term_examples : 191 : INFO : Getting search terms for user 1 2022-08-11 17:28:14,554 : api_util.py : get_search_term_examples : 192 : INFO : Found 100 photos 2022-08-11 17:28:16,226 : api_util.py : get_location_clusters : 362 : INFO : location clustering took 2.42 seconds 2022-08-11 17:29:07,270 : api_util.py : get_search_term_examples : 178 : INFO : 100 possible ids 2022-08-11 17:29:07,272 : api_util.py : get_search_term_examples : 191 : INFO : Getting search terms for user 1 2022-08-11 17:29:07,889 : api_util.py : get_search_term_examples : 192 : INFO : Found 100 photos 2022-08-11 17:29:08,899 : api_util.py : get_locationclusters : 362 : INFO : location clustering took 1.75 seconds""

derneuere commented 2 years ago

Alright, I will look into it!

loulou91 commented 2 years ago

Thanks! if I can help with specific test or logs... your'e welcome.

VlikeBanana commented 2 years ago

@derneuere I see 0 pics and I have no location pings on the map. Seems like I have not the same issue. #305 sounds more similar with my issue.

VlikeBanana commented 2 years ago

@derneuere Maybe thats the issue? Traceback (most recent call last): File "/usr/lib/librephotos/backend/api/directory_watcher.py", line 232, in rescan_image photo._geolocate_mapbox(True) File "/usr/lib/librephotos/backend/api/models/photo.py", line 447, in _geolocate_mapbox self.save() File "/usr/lib/librephotos/backend/api/models/photo.py", line 122, in save return super().save( File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/base.py", line 753, in save self.save_base(using=using, force_insert=force_insert, File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/base.py", line 790, in save_base updated = self._save_table( File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/base.py", line 872, in _save_table updated = self._do_update(base_qs, using, pk_val, values, update_fields, File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/base.py", line 926, in _do_update return filtered._update(values) > 0 File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/query.py", line 803, in _update return query.get_compiler(self.db).execute_sql(CURSOR) File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1522, in execute_sql cursor = super().execute_sql(result_type) File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1156, in execute_sql cursor.execute(sql, params) File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/utils.py", line 90, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) django.db.utils.NotSupportedError: conversion between UTF8 and SQL_ASCII is not supported LINE 1: ...stamptz, "exif_json" = NULL, "geolocation_json" = '{"type": ... ^

derneuere commented 2 years ago

I am not sure how you managed to do that. Did you change something with the Postgres setup? We do not use SQL_ASCII anywhere, because we are using Postgres 13 at the moment and Django also assumes that we use UTF8 everywhere.

VlikeBanana commented 2 years ago

@derneuere I just used the standard Unraid template from CA store. :D Btw I am also the guy from reddit with the issue concerning the "Umlaut-Ordner-Bug" :D

derneuere commented 2 years ago

@VlikeBanana Ah good to know! Sounds like there is an issue with the docker singleton image. Not sure what it good be though. It's probably the same issue as this one here: https://github.com/LibrePhotos/librephotos/issues/606