Comments (11)
As far as I can tell this should work. Is the camera visible with the lsusb
command immediately before and after Python fails to detect it?
from python-gphoto2.
lsubs
gives me this output both before and after Python failure:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:07dc Intel Corp.
Bus 001 Device 002: ID 04f2:b446 Chicony Electronics Co., Ltd
Bus 001 Device 006: ID 04b0:0414 Nikon Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Could me a permission error? I mean gphoto2 is trying to read the camera mounted (where?) and it cannot access
from python-gphoto2.
libgphoto2 (and hence the gphoto2 program and the Python interface) accesses a camera via libusb so it shouldn't be mounted. You could test permissions by using sudo to run your Python script.
Are you able to write a short C program to detect the camera using libgphoto2? If this fails then I think it might be worth asking on the gphoto2 mailing list.
from python-gphoto2.
Good idea for the sudo python, but nothing changes
I wrote a c code like this one:
#include <stdio.h>
#include <fcntl.h>
#include <gphoto2/gphoto2-camera.h>
int main(int argc, char **argv) {
Camera *camera;
int ret;
char *owner;
GPContext *context;
CameraText text;
context = gp_context_new();
gp_camera_new (&camera);
ret = gp_camera_init (camera, context);
if (ret < GP_OK) {
printf("No camera auto detected.\n");
gp_camera_free (camera);
return 0;
}
}
and the output is "No camera detected" :s but I am not totally sure I have used the correct headers from gphoto2
from python-gphoto2.
That looks the right sort of thing. I think the only include required is gphoto2/gphoto2.h
. You could print out the value of ret
to check it's -105
.
from python-gphoto2.
Argh,
I have a "Segmentation fault (core dumped)" error
from python-gphoto2.
Sorry, I've not tried using libgphoto2 from C. (And I'm not much of a C programmer.) I don't know what else to suggest now.
from python-gphoto2.
No problems :)
I will find it out
I think I messed up gphoto2 with two different installation
I'll check and uninstall and install
finger cross :)
Thanks for your help!
from python-gphoto2.
The ldd
command should show which version of libgphoto2 the Python modules are using and which version the gphoto2 command is using, if it's dynamically linked.
from python-gphoto2.
So I have re-installed everything and now I got this error after
gp.check_result(gp.gp_camera_init(camera, context))
(foreach_func [gphoto2-port-info-list.c:237]) Error during assembling of port list: 'Unspecified error' (-1).
(gp_port_serial_close [unix.c:461]) Invalid parameters: 'path' is NULL/FALSE.
(gp_context_error) Could not detect any camera
from python-gphoto2.
The first two error messages are typical of libgphoto2's excessive (in my view) verbosity. I'm not sure if they are really errors as I get them although everything appears to be working OK.
The last is what it says - your camera is not being detected.
(I'm on holiday at present, so I'm not able to give the same level of support as usual.)
from python-gphoto2.
Related Issues (20)
- Missing pre-req's(?) after building libgphoto2 from source on Raspberry Pi HOT 3
- Can not set datetime on Canon EOS 1200D HOT 4
- equivalent of gphoto2 --reset HOT 1
- delete a file HOT 2
- gp_camera_get_single_config HOT 2
- Socket error after gp_camera_exit in windows/msys2 HOT 15
- Faster way to copy files from camera HOT 7
- Sony FX3 overshoot HOT 1
- `delete_file()` does not delete file HOT 9
- Segmentation Fault segfault on gp.Camera.autodetect() on Github Actions Runner HOT 21
- LGPL vs. GPL license? HOT 8
- Test Virtual Camera HOT 4
- Missing bindings for gp_port_new, gp_port_open, and gp_port_reset? HOT 2
- capture_preview() broken in v2.5.0 HOT 4
- having trouble getting gphoto2 on rpi HOT 3
- use python-gphoto2 in Windows system HOT 1
- Always connected capture anytime HOT 1
- Github Actions Python 3.12 environment. HOT 1
- Is live data acquisition available in the library? HOT 1
- Error When Installing with "Local" libgphoto2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-gphoto2.