gphoto2-cffi | Python bindings for libgphoto2 with an idiomatic API | REST library
kandi X-RAY | gphoto2-cffi Summary
kandi X-RAY | gphoto2-cffi Summary
Python bindings for libgphoto2 with an idiomatic API
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the storage info
- List all directories
- Returns a list of all supported USB cameras
- Wrapper function for ctypes
- Creates a new GObject
- Get string from cfunc
- Capture a file
- Set the value of the option
- Wait for an event
- Get the data of the camera
- Camera instance
- Return a list of all supported cameras
- Capture a video
- Return an instance of CaptureCaptureContext
- Return the current configuration
- Get camera configuration
- Return an iterator over the directories in this directory
- Return config dictionary
- Returns a list of all possible choices
- Return an iterator over the files in this directory
gphoto2-cffi Key Features
gphoto2-cffi Examples and Code Snippets
Community Discussions
Trending Discussions on gphoto2-cffi
QUESTION
I try to control a Sony Alpha using Python/gphoto2 on a Raspberry PI. I've tried a number of python bindings (python-gphoto2, gphoto2-cffi, ...) but they all fail at the instruction to create a camera object (eg. my_cam = gphoto.Camera()) with the error:
"Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device."
We tried to kill background programs, make sure the kernel modules are not running, install the latest versions of the libraries and python packages, ... but could not get rid of the error. Furthermore C code using libgphoto2 works fine so it's not likely that the resource is really busy. We suspect the problem is missing USB libs in the python packages, and have tried to install libusb-dev, ... but it doesn't help.
Any suggestions what else we should try? Thanks.
...ANSWER
Answered 2019-Oct-14 at 22:09You mentioned trying python-gphoto2. I'm the author of that package. Assuming you have installed it successfully then I'd try the list-cameras.py
example program. It should list any cameras recognised by libgphoto2 that are connected and switched on.
If C programs are working but Python ones aren't you could check that they're using the same versions of libgphoto2. Try ldd
on the C program's executable and on one of the python-gphoto2 compiled modules, e.g. /usr/local/lib/python3.5/dist-packages/gphoto2/_camera.cpython-35m-arm-linux-gnueabihf.so
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gphoto2-cffi
You can use gphoto2-cffi like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page