jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
362 stars 59 forks source link

Lots of warnings when using gphoto2 from Python #35

Closed NiklasRosenstein closed 6 years ago

NiklasRosenstein commented 7 years ago

Hi! I'm getting a lot of these warnings when using python-gphoto2.

(gp_port_usb_close [libusb.c:325]) Invalid parameters: 'port && port->pl->dh' is NULL/FALSE.
(gp_port_usb_close [libusb.c:325]) Invalid parameters: 'port && port->pl->dh' is NULL/FALSE.
(ptp_usb_event [usb.c:530]) Reading PTP event failed: Timeout reading from or writing to the port (-10)
(ptp_usb_event [usb.c:530]) Reading PTP event failed: Timeout reading from or writing to the port (-10)
(camera_sony_capture [library.c:3800]) no object found during event polling. try the 0xffffc001 object id
(gp_port_usb_close [libusb.c:325]) Invalid parameters: 'port && port->pl->dh' is NULL/FALSE.

I have no idea where I should start looking for the source of these errors/warnings. Are these related to the Python bindings or could it be that the driver in libgphoto2 does not support my camera very well? If that's the case, is there a way to mute these warnings?

Thanks!

NiklasRosenstein commented 7 years ago

On another note, it appears to me that camera.capture() also downloads the file immediately, as it takes quite long to complete, and camera.file_get() takes only a very short amount of time. Is that correct? And if so, is there a way to only capture the image, get the filename, and download later?

jim-easterbrook commented 7 years ago

The error messages seem to be normal, depending on the particular camera driver. I couldn't get libgphoto2 only to report things that really are errors without getting all this debug info as well. I've not used capture much beyond a few tests and haven't really looked into its timing. This is really a question for the libgphoto2 mail list as the Python interface does nothing that would change the timings.