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

Backend throws exception for some videos, "file not found" #1276

Open
2 of 3 tasks
HMKnapp opened this issue May 18, 2024 · 1 comment
Open
2 of 3 tasks

Backend throws exception for some videos, "file not found" #1276

HMKnapp opened this issue May 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@HMKnapp
Copy link

HMKnapp commented May 18, 2024

πŸ› Bug Report

  • πŸ“ I've Included a ZIP file containing my librephotos log files
  • ❌ I have looked for similar issues (including closed ones)
  • 🎬 (If applicable) I've provided pictures or links to videos that clearly demonstrate the issue

πŸ“ Description of issue:

Backend crashes after video upload is complete.

proxy           | 192.168.0.190 - - [18/May/2024:22:47:25 +0000] "POST /api/upload/ HTTP/1.1" 200 109 "-" "UhuruPhotos/0.0.220 Dalvik/2.1.0 (Linux; U; Android 10; Nokia 7 plus Build/QKQ1.190828.002)"
backend         | Internal Server Error: /api/upload/complete/
backend         | Traceback (most recent call last):
backend         |   File "/code/api/models/file.py", line 73, in is_video
backend         |     filename = mime.from_file(path)
backend         |   File "/usr/local/lib/python3.10/dist-packages/magic/__init__.py", line 112, in from_file
backend         |     with _real_open(filename):
backend         | FileNotFoundError: [Errno 2] No such file or directory: ''
backend         | 
backend         | During handling of the above exception, another exception occurred:
backend         | 
backend         | Traceback (most recent call last):
backend         |   File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/exception.py", line 55, in inner
backend         |     response = get_response(request)
backend         |   File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/base.py", line 197, in _get_response
backend         |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
backend         |   File "/usr/local/lib/python3.10/dist-packages/django/views/generic/base.py", line 104, in view
backend         |     return self.dispatch(request, *args, **kwargs)
backend         |   File "/usr/local/lib/python3.10/dist-packages/django/utils/decorators.py", line 46, in _wrapper
backend         |     return bound_method(*args, **kwargs)
backend         |   File "/usr/local/lib/python3.10/dist-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
backend         |     return view_func(*args, **kwargs)
backend         |   File "/usr/local/lib/python3.10/dist-packages/django/views/generic/base.py", line 143, in dispatch
backend         |     return handler(request, *args, **kwargs)
backend         |   File "/usr/local/lib/python3.10/dist-packages/chunked_upload/views.py", line 100, in post
backend         |     return self._post(request, *args, **kwargs)
backend         |   File "/usr/local/lib/python3.10/dist-packages/chunked_upload/views.py", line 288, in _post
backend         |     self.on_completion(chunked_upload.get_uploaded_file(), request)
backend         |   File "/code/api/views/upload.py", line 144, in on_completion
backend         |     create_new_image(user, photo_path)
backend         |   File "/code/api/directory_watcher.py", line 82, in create_new_image
backend         |     if not is_valid_media(path):
backend         |   File "/code/api/models/file.py", line 133, in is_valid_media
backend         |     if is_video(path) or is_raw(path) or is_metadata(path):
backend         |   File "/code/api/models/file.py", line 77, in is_video
backend         |     raise False
backend         | TypeError: exceptions must derive from BaseException
proxy           | 192.168.0.190 - - [18/May/2024:22:47:26 +0000] "POST /api/upload/complete/ HTTP/1.1" 500 145 "-" "UhuruPhotos/0.0.220 Dalvik/2.1.0 (Linux; U; Android 10; Nokia 7 plus Build/QKQ1.190828.002)"

The video in question exists on the server. The same exception happens with other videos from the same phone as well.
(This could be an issue with Uhuru Photos, not necessarily with librephotos apart from the unhandled exception.)

πŸ” How can we reproduce it:

I can send you the video if you like.

Please provide additional information:

  • πŸ’» Operating system: librephotos-gpu Docker image
  • βš™ Architecture (x86 or ARM): x86_64
  • πŸ”’ Librephotos version: 2024w05
  • πŸ“Έ Librephotos installation method (Docker, Kubernetes, .deb, etc.): Docker
  • πŸ‹ If Docker or Kubernets, provide docker-compose image tag: librephotos-gpu:latest
  • πŸ“ How is you picture library mounted (Local file system (Type), NFS, SMB, etc.): local
  • ☁ If you are virtualizing librephotos, Virtualization platform (Proxmox, Xen, HyperV, etc.):
@pnaskardev
Copy link

Hi things I need

  1. API logs before the error
  2. Video clip of the error

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