-
Notifications
You must be signed in to change notification settings - Fork 329
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
Directory becomes "empty" after 1st access resulting in "PTP No Device (-52)" error #1069
Comments
if the camera is not present usually the api would not work anymore, it works only with the camera avaiable ... not sure i fully understand your usecase |
Regardless of the use case, I'd expect consistency - i.e. returning the same error on every call. |
How did you manage to call gp_camera_folder_list_folders without initializing the camera first? It seems like gp_camera_init would fail if no camera is plugged in, right? |
@pppanghu77 Camera is already initialized at that point. |
How was the camera initialized without being plugged in? Do you have a demo example? |
Camera is initialized while it's being plugged. It's as easy as turning it off/unplugging it afterwards. |
Describe the bug
When accessing a directory with device unplugged (via
gp_camera_folder_list_folders
), I'm gettingPTP No Device (-52)
error on the 1st try, but then on subsequent calls it returns successfully with an empty directory structure.Name the camera
I've seen it happen on many cameras (PTP Generic, Canon)
libgphoto2 and gphoto2 version
libgphoto2 2.5.31
The text was updated successfully, but these errors were encountered: