Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud scan broken #32

Closed
sysoppl opened this issue Dec 12, 2020 · 3 comments
Closed

Nextcloud scan broken #32

sysoppl opened this issue Dec 12, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@sysoppl
Copy link
Contributor

sysoppl commented Dec 12, 2020

I installed newest images from docker, on fresh server and nextcloud scan is not working.

Logs:

2020-12-12 17:01:05,131 : directory_watcher.py : isValidMedia : 20 : ERROR : Following image throwed an exception: /Folder/Second_Folder/
Traceback (most recent call last):
  File "/code/api/directory_watcher.py", line 17, in isValidMedia
    filetype = magic.from_file(p, mime=True)
  File "/miniconda/lib/python3.8/site-packages/magic.py", line 153, in from_file
    return m.from_file(filename)
  File "/miniconda/lib/python3.8/site-packages/magic.py", line 95, in from_file
    with open(filename):
FileNotFoundError: [Errno 2] No such file or directory: '/Folder/Second_Folder/'

2020-12-12 17:01:33,176 : directory_watcher.py : isValidMedia : 20 : ERROR : Following image throwed an exception: /Folder/Second_Folder/18-09-21 07-51-50 0959.jpg
Traceback (most recent call last):
  File "/code/api/directory_watcher.py", line 17, in isValidMedia
    filetype = magic.from_file(p, mime=True)
  File "/miniconda/lib/python3.8/site-packages/magic.py", line 153, in from_file
    return m.from_file(filename)
  File "/miniconda/lib/python3.8/site-packages/magic.py", line 95, in from_file
    with open(filename):
FileNotFoundError: [Errno 2] No such file or directory: '/Folder/Second_Folder/18-09-21 07-51-50 0959.jpg'

Local scan is working

derneuere added a commit that referenced this issue Dec 13, 2020
@derneuere
Copy link
Member

I created a new image. Please do a docker-compose pull and then a docker-compose up. It should work now. If it does close the issue :)

@derneuere derneuere added the bug Something isn't working label Dec 13, 2020
@sysoppl
Copy link
Contributor Author

sysoppl commented Dec 13, 2020

Well, pulled new image, started container and same as before, instant "job finished"

2020-12-13 10:43:40,465 : image_similarity.py : build_image_similarity_index : 28 : INFO : builing similarity index for user USER1
2020-12-13 10:43:40,472 : image_similarity.py : build_image_similarity_index : 28 : INFO : builing similarity index for user USER2
2020-12-13 10:43:40,476 : image_similarity.py : build_image_similarity_index : 28 : INFO : builing similarity index for user USER3
2020-12-13 10:43:40,480 : image_similarity.py : build_image_similarity_index : 28 : INFO : builing similarity index for user USER4
2020-12-13 10:45:12,512 : directory_watcher.py : scan_photos : 59 : INFO : Downloaded photo from nextcloud to /data/nextcloud_media/FOLDER/FOLDER2/FOLDER3/
2020-12-13 10:45:12,512 : directory_watcher.py : scan_photos : 59 : INFO : Downloaded photo from nextcloud to /data/nextcloud_media/FOLDER/FOLDER2/FOLDER4/
2020-12-13 10:45:12,512 : directory_watcher.py : scan_photos : 59 : INFO : Downloaded photo from nextcloud to /data/nextcloud_media/FOLDER/FOLDER2/FOLDER5/
2020-12-13 10:45:12,520 : directory_watcher.py : scan_photos : 75 : INFO : begin handling of photo 1/3
2020-12-13 10:45:12,520 : directory_watcher.py : scan_photos : 97 : ERROR : [Errno 21] Is a directory: '/data/nextcloud_media/FOLDER/FOLDER2/FOLDER3/'
Traceback (most recent call last):
  File "/code/nextcloud/directory_watcher.py", line 76, in scan_photos
    handle_new_image(user, image_path, job_id)
  File "/code/api/directory_watcher.py", line 31, in handle_new_image
    if isValidMedia(open(image_path,"rb").read(2048)):
IsADirectoryError: [Errno 21] Is a directory: '/data/nextcloud_media/FOLDER/FOLDER2/FOLDER3/'
2020-12-13 10:45:13,696 : views.py : list : 840 : INFO : querying & serializing took 0.01 seconds
2020-12-13 10:45:20,557 : views.py : list : 840 : INFO : querying & serializing took 0.01 seconds

This time log does not contain several thousands of error messages, but only this one above

@derneuere
Copy link
Member

Alright. I created a new image. Please do a docker-compose pull and then a docker-compose up. It should work now. If it does close the issue :)

@sysoppl sysoppl closed this as completed Dec 13, 2020
AnkurPrabhu pushed a commit to AnkurPrabhu/librephotos that referenced this issue Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants