PhotoboothProject / photobooth

OpenSource Photobooth Webinterface
https://photoboothproject.github.io
MIT License
307 stars 66 forks source link

[BUG]: #710

Closed thetechnikfreak closed 4 months ago

thetechnikfreak commented 4 months ago

Describe the bug

Wenn i Take a Foto via gphoto2 IT gives ou this Error but when i Take the Picture via command ITS fine : curl --data "style=photo" http://192.168.178.71/api/capture.php
Warning: chdir(): No such file or directory (errno 2) in /var/www/html/src/PhotoboothCapture.php on line 107
{"error":"File was not created","cmd":"gphoto2 --capture-image-and-download --filename=\/var\/www\/html\/data\/tmp\/20240517_192930.jpg 2>&1","returnValue":0,"output":[""," Error ","An error occurred in the io-library ('I\/O problem'): No error description available","ERROR: Could not capture image.","ERROR: Could not capture.",""," Error ","An error occurred in the io-library ('I\/O problem'): No error description available"]}

Steps to reproduce the behavior

Make a Photo

Expected behavior

Give a Error

Photobooth Version

Newest

Browser and browser version

Chromium newest

Operating System

Raspi os

Did it work before?

No

Latest working version

No response

Additional context

No response

andi34 commented 4 months ago

Sounds like an permissions error which is unrelated to Photobooth. Guess that's why there's no real error messages available.

You'd need to fix capturing via www-data user. Some cameras might need additional udev rule(s).

See https://gist.github.com/andi34/123d1cb9069748494803cd5828171f6b for reference on an EOS 300D and EOS 350D. Create /etc/udev/rules.d/51-gphoto-device.rules, add needed information and do sudo udevadm control --reload-rules.