Closed sjohns5 closed 3 years ago
USB on virtual machines can often be problematic. If it works with the gphoto2 command line then it should work with python-gphoto2.
Sorry I misspoke I am running it on a physical ubuntu device with the USB pulled in. Apache2 isnt able to call the gphoto2 command within python.
The libgphoto2 documentation isn't much help about error -7. http://www.gphoto.org/doc/api/gphoto2-port-result_8h.html#a503f642aca99f5001d85af2c1c3805ae
I agree that it's probably a permissions problem, but I don't know anything about configuring Apache2 web servers to run Python, or giving web servers access to USB ports.
Thanks jim, I was able to figure it out I had to change the permissions on the usb!
This page is for reporting problems with the Python interface to libgphoto2. If your question is about using libgphoto2 you should ask on the gphoto2 mailing list.
Your system What version of Python are you using? 3.8 What version of libgphoto2 have you installed? 2.5.25 How have you installed (or attempted to install) python-gphoto2? yes Your problem Please describe what you are trying to do and what goes wrong. A short Python script that shows the problem may be useful. Hi Jim,
I am able to successfully run gphoto2 via python but am running into an issue when trying to call the script from a virtual host, apache2, and am curious if you have ran into this issue before. I believe that it is a permissions issue on apache2, any thoughts?
Below is the error message that I am receiving. Thank you
Traceback (most recent call last): File "/usr/lib/cgi-bin/test.py", line 22, in
camera.init()
gphoto2.GPhoto2Error: [-7] I/O problem