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

Problems with python sdk using http on GoPro12. #412

Closed
hideakidayo opened this issue Oct 2, 2023 · 6 comments
Closed

Problems with python sdk using http on GoPro12. #412

hideakidayo opened this issue Oct 2, 2023 · 6 comments
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@hideakidayo
Copy link

Component
What is the bug in?

  • Demos (python sdk)
  • Specs (HTTP)

Describe the bug
test.py
import subprocess
subprocess.run(["gopro-photo", "--wired", "--identifier", "3282", "--output", ". /images/"])

when running HERO12, you can see the error as shown in the screenshot.
Previously I used HERO11 and with the SDK as of HERO11 this command could be executed without error.

In the SDK as of 0.14.1, I also saw the same error as #409 when I executed the same command in HERO11.

Expected behavior
Originally, when this command is executed, the photos taken are saved in the images folder, but an error occurs.

Screenshots
image

Hardware

  • Camera: Hero12.
  • Windows11
  • python3.11.4
@hideakidayo hideakidayo added the bug Something isn't working label Oct 2, 2023
@hideakidayo hideakidayo changed the title Bug Description Problems with python sdk using http on GoPro12. Oct 2, 2023
@jacksongs
Copy link

I appear to be having similar issues. I can make requests using the python library "requests" to the HTTP endpoints without error, and the endpoints even work in the browser.

Running:
-Python 3.10.11 (via miniconda)
-OSX Sonoma

OUTPUT:

(base) XXXXX % gopro-photo --wired --identifier XXXX
INFO 23:19:05.757 builders.py:853
<<<<<<<<--------------
"id" : "Camera Control Wired Usb",
"protocol" : "HTTP",
"endpoint" : "gopro/camera/control/wired_usb?p=1",
"p" : "Toggle.ENABLE",
<<<<<<<<--------------

WARNING 23:19:05.774 ConnectionError(ProtocolError('Connection aborted.', BadStatusLine('gpHttpServer: [07353924][INFO gopro_base.py:359
] conn 0: /gopro/camera/control/wired_usb?p=1 @civetweb.c:17872\n')))
WARNING 23:19:07.777 Retrying #0 to send the command... gopro_base.py:364
WARNING 23:19:07.785 ConnectionError(ProtocolError('Connection aborted.', BadStatusLine('gpHttpServer: [07355935][INFO gopro_base.py:359
] conn 0: /gopro/camera/control/wired_usb?p=1 @civetweb.c:17872\n')))
WARNING 23:19:09.788 Retrying #1 to send the command... gopro_base.py:364
WARNING 23:19:09.796 ConnectionError(ProtocolError('Connection aborted.', BadStatusLine('gpHttpServer: [07357946][INFO gopro_base.py:359
] conn 0: /gopro/camera/control/wired_usb?p=1 @civetweb.c:17872\n')))
WARNING 23:19:11.800 Retrying #2 to send the command... gopro_base.py:364
WARNING 23:19:11.807 ConnectionError(ProtocolError('Connection aborted.', BadStatusLine('gpHttpServer: [07359958][INFO gopro_base.py:359
] conn 0: /gopro/camera/control/wired_usb?p=1 @civetweb.c:17872\n')))
WARNING 23:19:13.811 Retrying #3 to send the command... gopro_base.py:364
WARNING 23:19:13.818 ConnectionError(ProtocolError('Connection aborted.', BadStatusLine('gpHttpServer: [07361969][INFO gopro_base.py:359
] conn 0: /gopro/camera/control/wired_usb?p=1 @civetweb.c:17872\n')))
WARNING 23:19:15.821 Retrying #4 to send the command... gopro_base.py:364
ERROR 23:19:15.824 ResponseTimeout('Response timeout occurred of 5 seconds') photo.py:53

@tony-gutierrez
Copy link

I am having the same errors. I was about to open an issue but couldn't recreate today, for some reason.

ConnectionError(ProtocolError('Connection aborted.', BadStatusLine('gpHttpServer: [07361969][INFO gopro_base.py:359 ] conn 0: /gopro/camera/control/wired_usb?p=1 @civetweb.c:17872\n')))

@jacksongs
Copy link

I'm able to work around this issue by setting the HTTP version to 0.9 in a curl request, ie:

command = ['curl','--verbose','--http0.9', "http://XXXXX:8080/gopro/camera/shutter/start"]
result = subprocess.run(command, capture_output=True, text=True)

@tcamise-gpsw tcamise-gpsw added the demos Relating to demos label Dec 6, 2023
@tcamise-gpsw tcamise-gpsw self-assigned this Dec 6, 2023
@tcamise-gpsw
Copy link
Collaborator

Hi I have not been able to reproduce this. There have been some large updates recently so can you try again on version 0.15.1?

@tcamise-gpsw tcamise-gpsw added the feedback requested Further information is requested label Dec 7, 2023
@tony-gutierrez
Copy link

I haven't seen that error in a while, but the 12s do seem much more temperamental than the 11s. I'm using a lot of them in a commercial setting. Also, if you have the labs firmware loaded, it seems that you have to introduce some delay in between HTTP commands. Otherwise you get 500 errors.

@tcamise-gpsw tcamise-gpsw removed the demos Relating to demos label Dec 8, 2023
@tcamise-gpsw
Copy link
Collaborator

This appears to be a duplicate of #437 which will have a fix in the next release.

@tcamise-gpsw tcamise-gpsw closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
@tcamise-gpsw tcamise-gpsw added duplicate This issue or pull request already exists and removed feedback requested Further information is requested labels Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants