Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple warnings when capturing an image #12

Closed
tilowestermann opened this issue Feb 5, 2016 · 4 comments
Closed

Multiple warnings when capturing an image #12

tilowestermann opened this issue Feb 5, 2016 · 4 comments

Comments

@tilowestermann
Copy link

I'm using the latest version go python-gphoto2 and experiencing the following warnings when capturing a picture (Canon 600D) on a Raspberry Pi 2:

WARNING: gphoto2: (foreach_func [gphoto2-port-info-list.c:237]) Error during assembling of port list: 'Unspecified error' (-1).
WARNING: gphoto2: (ptp_list_folder_eos [library.c:7017]) storage 0xffffffff, but handle 0x00000000?
Capturing image
WARNING: gphoto2: (camera_canon_eos_capture [library.c:3088]) no focus info?
Camera file path: /store_00020001/DCIM/100CANON/IMG_3223.JPG
Copying image to /tmp/IMG_3223.JPG
WARNING: gphoto2: (ptp_usb_getresp [usb.c:428]) PTP_OC 0x911c receiving resp failed: PTP Device Busy (0x2019)
WARNING: gphoto2: (camera_unprepare_canon_eos_capture [config.c:450]) 'ptp_canon_eos_resetuilock (params)' failed: PTP Device Busy (0x2019)

Using the command line, there is no warning.

Installed gphoto2 info:

gphoto2         2.5.9          gcc, popt(m), exif, no cdk, no aa, jpeg, no readline
libgphoto2      2.5.9          all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         gcc, ltdl, USB, serial without locking
@jim-easterbrook
Copy link
Owner

Do you get the same messages if you run the gphoto2 command with --debug-loglevel error --debug options?
Libgphoto2 doesn't discriminate well enough between errors, warnings and debug info in my opinion. You either get nothing or a lot of stuff that isn't really a problem. You could try fine-tuning the logging as described in the python-gphoto2 readme.

@WillNye
Copy link

WillNye commented Jun 15, 2016

I'm seeing the same issue it also seems to have an impact on interval photos, it seems to be overwriting images on the camera as opposed to appending them. As a result this will take 15 photos but only 1 will be on the camera (the last photo taken)

    for x in range(15):
        file_path = gp.check_result(gp.gp_camera_capture(
            camera, gp.GP_CAPTURE_IMAGE, context))
    gp.check_result(gp.gp_camera_exit(camera, context))

@jim-easterbrook
Copy link
Owner

Have you set the capture target to "memory card" or "internal ram"? (Those are the options on my camera, yours may be different.)
Do you get a different file_path value on each capture?

@WillNye
Copy link

WillNye commented Jun 16, 2016

I finally figured it out after banging my head against a wall. I had set it manually to the memory card, HOWEVER, it was getting reset to write to RAM after the first photo was taken. The reason turns out to be my camera was plugged into a USB port which was not integrated. After plugging into a USB port that was directly on the MOBO it works fine now. A very odd bug and no clue what causes this. I tried it on 5 different external ports and got the same issue. Plugged it into 3 MOBO USB ports works like a charm.

The warnings read like it causes a problem with the PTP for some reason. I'd ask the OP if he is using a HUB or is plugged directly into the pi. If he isn't, try that and see if it works because I had the same error messages. Also, this is not a python-gphoto2 issue. I got the same problem when calling gphoto2 from terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants