gphoto2 icon indicating copy to clipboard operation
gphoto2 copied to clipboard

Issue with Canon EOS 1300D: Error (-110: 'I/O in progress')

Open asmhug opened this issue 6 years ago • 19 comments

Hi.

We have developed a photo booth, using Canon 1300D and Raspberry Pi 3, controlled through gphoto2 2.5.11. "--capture-image-and-download" works like a charm for a week at a time, and then the camera gets stuck in busy mode, for some reason.

" *** Error *** Canon EOS Full-Press failed (0x2019: PTP Device Busy) ERROR: Could not capture image. ERROR: Could not capture. *** Error (-110: 'I/O in progress') ***

For debugging messages, please use the --debug option. Debugging messages may help finding a solution to your problem. If you intend to send any error or debug messages to the gphoto developer mailing list [email protected], please run gphoto2 as follows:

env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --capture-image-and-download

Please make sure there is sufficient quoting around the arguments. "

Attached is a detailed log from the erroneous behavior. It would be extremely helpful if anyone could provide an advice to mend the sorry state our photo booth frequently finds itself in. canon1300D_IO_busy.txt

Thx in advance.

asmhug avatar Jun 15 '18 12:06 asmhug

libgphoto2 should be updated to 2.5.18 ... several bugfixes were neeed for newer EOS like the 1300d

msmeissn avatar Jun 15 '18 13:06 msmeissn

Thank you so much for the quick reply.

Though, even after upgrading to libgphoto2 version 2.5.18, the problem persists. After about 600 images captured, any connection for performing some sort of action on the EOS 1300D is rejected. Attached you can find logging from --capture-image-and-download, --list-all-config and similar commands, with corresponding errors (which are the same I/O error).

Would you happen to have any other ideas on how to fix this issue?

Thx again, for the work and for being helpful.

EOS_Error_List-all-config.txt EOS_Error_Log_Debug.txt EOS_Error_Log_Short.txt

asmhug avatar Jun 19 '18 10:06 asmhug

@msmeissn, do you have any suggestions as to solve my latest issue, since upgrading libgphoto2 did not materialize in improved behavior?

asmhug avatar Jun 22 '18 12:06 asmhug

The same behavior appears on the EOS 2000D, but that was more or less expected.

asmhug avatar Jun 26 '18 10:06 asmhug

@msmeissn , is this solvable in any way you see fit, or will a restart of the camera be a nessecary measure?

asmhug avatar Aug 08 '18 07:08 asmhug

hmm, the logs show that the camrea no longer reacts to any command :/

one method would be to try: gphoto2 --reset in that case, which issues a usb reset.

otherwise that this happens after 600 successful runs makes it quite tricky. if the last good run before the first bad run could be captured it would be interesting to see

msmeissn avatar Aug 09 '18 06:08 msmeissn

Also having the same or similar issue. It can take 1 image, then it can't take another one, and then it takes another one. It is almost like an On Off On Off kind of deal. I am taking the images about 6 seconds apart from each other. I will increase the time between photos and see if it works

MineThingIssues avatar Feb 23 '19 14:02 MineThingIssues

I'm getting the same error on the 60D. Below is the full error I'm seeing:

`2020-07-16 17:42:01,436 - octolapse.script - ERROR - Error output (stderr) for 'Canon 60D - Snapshot Camera Script':

*** Error ***              
Canon EOS Full-Press failed (0x2019: PTP Device Busy)
ERROR: Could not capture image.
ERROR: Could not capture.
*** Error (-110: 'I/O in progress') ***  `

I haven't found a reliable pattern for this but it does seem to happen after the camera has been on for a while. I'm currently using gphoto2 with Octolapse which is a plugin for the Octoprint 3D printing server platform.

In my case, turning the camera off then back on seems to have fixed the issue for now. I'm wondering if maybe the camera is storing something in memory or whenever a snapshot is taken and is running out of memory after a certain number or something. I'm not storing the images on the SD card.

AlteriusOmega avatar Jul 16 '20 17:07 AlteriusOmega

I'm getting the same error on the 60D. Below is the full error I'm seeing:

`2020-07-16 17:42:01,436 - octolapse.script - ERROR - Error output (stderr) for 'Canon 60D - Snapshot Camera Script':

*** Error ***              
Canon EOS Full-Press failed (0x2019: PTP Device Busy)
ERROR: Could not capture image.
ERROR: Could not capture.
*** Error (-110: 'I/O in progress') ***  `

I haven't found a reliable pattern for this but it does seem to happen after the camera has been on for a while. I'm currently using gphoto2 with Octolapse which is a plugin for the Octoprint 3D printing server platform.

In my case, turning the camera off then back on seems to have fixed the issue for now. I'm wondering if maybe the camera is storing something in memory or whenever a snapshot is taken and is running out of memory after a certain number or something. I'm not storing the images on the SD card.

@AlteriusOmega or @MineThingIssues

Did you ever find a solution for this? I can take one picture and then I get the Error (-110: "I/O in progress)....I've check to have the latest versions of everything, including the firmware on my Camera.

Seems like its a camera issue as if I turn it off and then on the script will run again, but only once then I get an error on the next picture.

3Ddesignbros avatar Mar 17 '21 03:03 3Ddesignbros

can you try adding in a --wait-event=2s before the capture-image ?

msmeissn avatar Mar 28 '21 14:03 msmeissn

can you try adding in a --wait-event=2s before the capture-image ?

yes, i tried many times "a --wait-event=2s" or "--reset" but result did not changed.

I use canon 2000d, after i capture a photo or write a command, come up this error ;

"*** Error ***
Canon EOS Full-Press failed (0x2019: PTP Device Busy) ERROR: Could not trigger capture. *** Error (-110: 'I/O in progress') ***

I wait your tactics

alperenkilic avatar Nov 11 '21 11:11 alperenkilic

I'm having the same problem with a Canon 1300D. After a few hundred photos, I start getting this error. It still occurs after updating to libgphoto2 2.5.29.

jslight90 avatar Jun 18 '22 00:06 jslight90

Hello everyone, I think I found how to get rid of this error. I was getting this error when I typed gphoto2 --trigger-capture. instead use the command gphoto2 --set-config viewfinder=1 --trigger-capture

alperenkilic avatar Jun 24 '22 15:06 alperenkilic

I have the same problem with my Canon 2000D. I have 2 cameras configured to capture every 10 minutes, one of them get's stuck and don't recover until I disconnect both power and usb. It usually happens at night (1am-4am) after a whole week.

Radeox avatar Jun 27 '22 09:06 Radeox

I have been getting the same error while trying to capture pictures with gphoto2 and Canon 5d Mark IV: *** Error ***

Canon EOS Full-Press failed (0x2019: PTP Device Busy)

ERROR: Could not capture image.

ERROR: Could not capture.

*** Error (-110: 'I/O in progress') ***

There is an option called mirror lockup. It is usually used to avoid blur when using telephoto lenses because they end up shaking the camera despite tripods. When I disabled the mirror lockup, I stopped getting that error.

My whole process of debugging the error is here: https://wiki.harvard.edu/confluence/display/hufasstubbsgroup/Ali+Kurmus+-+Strobed+Internal+DIMM

It starts under July 26th.

alikurmus avatar Aug 02 '22 15:08 alikurmus

I started doing some automatic captures this morning, and after many pictures (not sure how many), I also started to get this error randomly. I my case it's a Nikon D7200. It's always when executing camera.set_config(). Here's what the code looks like and a run with the error:

#! /usr/bin/env python3

import argparse

import gphoto2


def get_camera():
    print('Ready')
    camera = gphoto2.Camera()
    print('Initializing camera')
    camera.init()

    return camera


def capture(camera, f_value):
    new_value = f"""f/{f_value}"""
    print(f"""Capturing {new_value}""")

    print('Getting Config')
    config = camera.get_config()
    config.get_child_by_name('actions').get_child_by_name('autofocusdrive').set_value(True)
    config.get_child_by_name('capturesettings').get_child_by_name('exposurecompensation').set_value('0')

    config.get_child_by_name('capturesettings').get_child_by_name('f-number').set_value(new_value)
    print(f"""Setting config for {new_value}""")
    camera.set_config(config)  # **** IT ALWAYS FAIL HERE ****

    config = camera.get_config()
    camera_value = config.get_child_by_name('capturesettings').get_child_by_name('f-number').get_value()
    if camera_value != new_value:
        print(f"""Camera didn't accept value, it's {camera_value}; skipping""")
        print()
        return

    dst = f"""foo.jpg"""

    print('Capturing')
    src = camera.capture(gphoto2.GP_CAPTURE_IMAGE)
    print('Fetching')
    file = camera.file_get(src.folder, src.name, gphoto2.GP_FILE_TYPE_NORMAL)
    print('Saving')
    file.save(dst)
    print('Done.')
    print()


def main():
    f_values = [ '3.5', '3.8', '4', '4.2', '4.5', '4.8', '5', '5.3', '5.6', '6.3', '7.1', '8', '9', '10', '11' ]

    camera = get_camera()

    if True:
        for f_value in f_values:
            try:
                capture(camera, f_value)
            except gphoto2.GPhoto2Error as e:
                # gphoto2.GPhoto2Error: [-110] I/O in progress
                print(f"""got {e.code}, [{e.args}], {dir(e)}""")
                # I also tried to get the camera again, but I get this error:
                # gphoto2.GPhoto2Error: [-53] Could not claim the USB device
                # camera = get_camera()
                # capture(camera, zoom, f_value)
                # no other option yet
                raise


if __name__ == '__main__':
    main()

And a traceback example from before I added the try/except:

Traceback (most recent call last):
  File "/home/mdione/src/projects/machines/ansel/lens_test.py", line 90, in main
    capture(camera, zoom, f_value)
  File "/home/mdione/src/projects/machines/ansel/lens_test.py", line 58, in capture
    camera.set_config(config)
gphoto2.GPhoto2Error: [-110] I/O in progress

StyXman avatar Jan 07 '23 15:01 StyXman

(yes, the code does not quite match, I simplified a little the one I sent).

StyXman avatar Jan 07 '23 15:01 StyXman

please open new issues if its another camera type, otherwise it is too confusing.

It is hard to say why this happens, would be good to have a debuglevel logfile from around the call.

msmeissn avatar Jan 08 '23 14:01 msmeissn

@msmeissn - fwiw, I reported it in another multi-year open bug for the PS SX70 HS, using the CLI and just replicated it with the code from @StyXman

I noticed, using some other software, that the camera sometimes reports f-numbers that are along the lines of 'unknownD16' or some such, so I feel like it is a broader bug in traversing the config tree. Will happily open a bug for this particular instance if you would like

flipphillips avatar Feb 15 '24 16:02 flipphillips