You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'm really enjoying playing with OwnPhotos, but I ran into an issue that I can't figure out how to fix without digging into the database. Essentially, I accidentally added a photo with a non ascii character (∞) and ran scan photos. The scan photos job failed with the below error, but OwnPhotos still thinks that the job is running. I stopped the docker container and deleted the file, and restarted it. The web UI still thinks that scan photos is running, but this is not reflected in the logs.
I was able to fix the issue by removing the most recent entry in the api_longrunningjob table of my postgres database. I used the following command:
DELETE FROM api_longrunningjob WHERE id in (SELECT id from api_longrunningjob ORDER BY id desc LIMIT 1);
00:11:01 UnicodeEncodeError: 'utf-8' codec can't encode character '\udce2' in position 49: surrogates not allowed Traceback (most recent call last): File "/venv/lib/python3.5/site-packages/rq/worker.py", line 793, in perform_job rv = job.perform() File "/venv/lib/python3.5/site-packages/rq/job.py", line 599, in perform self._result = self._execute() File "/venv/lib/python3.5/site-packages/rq/job.py", line 605, in _execute return self.func(*self.args, **self.kwargs) File "/code/api/directory_watcher.py", line 100, in scan_photos if not Photo.objects.filter(image_path=image_path).exists(): File "/venv/lib/python3.5/site-packages/django/db/models/query.py", line 715, in exists return self.query.has_results(using=self.db) File "/venv/lib/python3.5/site-packages/django/db/models/sql/query.py", line 509, in has_results return compiler.has_results() File "/venv/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1036, in has_results return bool(self.execute_sql(SINGLE)) File "/venv/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1067, in execute_sql cursor.execute(sql, params) File "/venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 100, in execute return super().execute(sql, params) File "/venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 68, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers return executor(sql, params, many, context) File "/venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 85, in _execute return self.cursor.execute(sql, params)
Thank you for your work on this project!
The text was updated successfully, but these errors were encountered:
Hey, I'm really enjoying playing with OwnPhotos, but I ran into an issue that I can't figure out how to fix without digging into the database. Essentially, I accidentally added a photo with a non ascii character (∞) and ran scan photos. The scan photos job failed with the below error, but OwnPhotos still thinks that the job is running. I stopped the docker container and deleted the file, and restarted it. The web UI still thinks that scan photos is running, but this is not reflected in the logs.
I was able to fix the issue by removing the most recent entry in the
api_longrunningjob
table of my postgres database. I used the following command:DELETE FROM api_longrunningjob WHERE id in (SELECT id from api_longrunningjob ORDER BY id desc LIMIT 1);
00:11:01 UnicodeEncodeError: 'utf-8' codec can't encode character '\udce2' in position 49: surrogates not allowed Traceback (most recent call last): File "/venv/lib/python3.5/site-packages/rq/worker.py", line 793, in perform_job rv = job.perform() File "/venv/lib/python3.5/site-packages/rq/job.py", line 599, in perform self._result = self._execute() File "/venv/lib/python3.5/site-packages/rq/job.py", line 605, in _execute return self.func(*self.args, **self.kwargs) File "/code/api/directory_watcher.py", line 100, in scan_photos if not Photo.objects.filter(image_path=image_path).exists(): File "/venv/lib/python3.5/site-packages/django/db/models/query.py", line 715, in exists return self.query.has_results(using=self.db) File "/venv/lib/python3.5/site-packages/django/db/models/sql/query.py", line 509, in has_results return compiler.has_results() File "/venv/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1036, in has_results return bool(self.execute_sql(SINGLE)) File "/venv/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1067, in execute_sql cursor.execute(sql, params) File "/venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 100, in execute return super().execute(sql, params) File "/venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 68, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers return executor(sql, params, many, context) File "/venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 85, in _execute return self.cursor.execute(sql, params)
Thank you for your work on this project!
The text was updated successfully, but these errors were encountered: