-
Notifications
You must be signed in to change notification settings - Fork 148
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
Error on running gopro-video demo #14
Comments
Just guessing .... but the top-level SDK requirements seem to imply that the demos don't run natively on Windows; you must run from within a Docker image, which has all the right versions of python, all tools, packages, etc. EDIT: never mind ... the requirements linked to above are for the docs not the demos, so Docker is not specified as being required. FWIW: I have a similar Windows setup (but sadly, my gopro has yet to be delivered) but the following worked for me:
|
After inspecting code, I think it would likely run if I pass the id, and paths arguments via cli. I’ll try it and comment back.
…Sent from my iPhone
On Jul 4, 2021, at 7:38 PM, dave russo ***@***.***> wrote:
Just guessing .... but the top-level SDK requirements seem to imply that the demos don't run natively on Windows; you must run from within a Docker image, which has all the right versions of python, all tools, packages, etc.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
A little more on this problem. I think this may be due to a python version conflict I have on my machine. I assume the gopro-stream.exe runs "python" on my machine and passes the demo module to it. My python path maps to version 3.7 branch. But, my py path maps to a 3.8 version. I think I've seen somewhere that python 3.8 is required? am trying to upgrade my environmnt to see if this is the problem. |
I think the position only parameter symbol (,/) is to blame, which is used in python3.8: https://www.python.org/dev/peps/pep-0570/ So try with python3.8 . |
I didn't see 3.8 mentioned in the docs, but I noticed it in the open-gopro package's
|
I did try by activating a virtual environment with version 3.8 in it. I'm not how gopro-stream.exe calls python but if its using my virtual enviromnt python where I executed it from, I still get the error. (stockdata) PS C:\Users\lee\Dropbox\python sandbox\OpenGoPro> python --version |
After realizing I was probalby running into a python version issue, I followed @daverusso suggestion to setup a virtual environmnt with python=3.8. I reported above what happened when I tried to run in the env. But, after doing the pip install of open-gopro within my env, I'm now gettiing a different error:
|
Ran into this issue (#8) as well, make sure you run the latest opengopro python code (try cloning it instead of installing via pip) |
Thanks @KonradIT . Success! Here was my process:
Victory! |
Hmm would be nice if GoPro released the fix currently in main branch to pypi |
Hi all. Just to clarify, you should be able to do the following:
Some of the above errors look like conflicting python packages / versions which is not unexpected if you are not using virtual environments or if you are using a different Python version than 3.8. I would say it is just general best practice with Python to use a virtual environment. If you are running into something else after doing the above steps, let me know and I'll try to reproduce. FYI this is very much still in alpha / beta but we are actively working on improving it. It looks like at minimum, we need to update the getting started documentation. Also, there is some future work to support other Python versions besides 3.8.x EDIT: Sorry, I just realized the Windows fix hasn't been published to pypi yet. I will do that this week. |
@KonradIT I will work on doing that this week. |
Note that on Windows, @leeprevost will need this PR (#11) to be on the code. The latest PyPi release is dated May 27th. So the bug fix is not there. @tcamise-gpsw I actually had this issue and could reproduce it, and made a PR. Just in case, would it be possible to have an updated Python package on PyPi based off the latest |
Yep, you're correct. Sorry for the confusion. Anyway, I just published the fix at version 0.5.7 |
@tcamise-gpsw or @KonradIT - thanks for your comments on this. I wonder if you could direct me to a discussion area where I could post a job spec for hiring a project devloper for a small opengopro project. My target system is problably linux/pizero but likely develop on windows. mainly looking for initialization/pairing scripts, sleep/wake, and video stream on scripts. Likely embedded with web server and flask. Also, i'm not a hardcore developer and I must share that I've had a pretty rough time wth the windows user experience with this. I've gotteen through the tutorials and the demos but with the problems you see above. I'm also running into what I think are problems with how Blink handles cross platform. it seems like the process for scanning, pairing, and then connecting are different for windows vs. linux? I have trouble getting gopro to reconnect after it goes to sleep and think the standard demo scripts try to repair the device. You can see my experince here: hbldh/bleak#367 (comment) posted on the bleak issues list (but which may be more relevant here). Apprciate any help you can give me here. Edit: I meant to add that I woudl be glad to help out as I know htis project is still early and being refined so it its helpful, I could share my windows expeience. I imagine this is focused more on other platforms which is understandable but I woudl suggest that even though the developer may intend to develop on linux, many like me may have their first experience OGP on windows and IMO that experience is rough. |
FWIW: after a Thanks to both @KonradIT and @tcamise-gpsw! Really nice to see such rapid support. I struggled a bit this morning due to bonehead mistakes on my side:
That said, I still have to run the
Finally, thanks for the very nice |
Looks like awesome progress @daverusso. That process looks much smoother! Nice improvement. I too am getting inconsistent results with the demos and tutorials particulary after GoPro sleeps. I wonder if the routine needs to:
I referred to my issues post on the bleak repo above hbldh/bleak#367 (comment) to what I'm finding. |
Yep, keeping the USB plugged in keeps the bluetooth discoverable even after a "power down". I also suspect Windows is partly to blame, I really should be using the Raspberry or even WSL2. I'm asking for trouble by using my desktop run the demos: when downloading the video, for example, Windows must disconnect from my LAN and connect to the hero's access point. This no doubt takes much longer than the demos expect and triggers events that would unnecessarily complicate demos that really should be running on an embedded device. That said, I've done things like this in the past, so I'm optimistic that I can make progress creating a development environment before moving the code to the Raspberry. |
Me too. But that is what I thought bleak was supposed to do for us - ie make Bluetooth platform neutral/independent. My eventual target application is rpizero but it seems many would experience this inconsistency even as developers while trying first experience in windows. |
There isn't really an alternative to What was your pairing procedure with Windows? |
It was using the connect_ble.py in the tutorials. Also, you can see my link to the issue log on bleaks repo above. hbldh/bleak#367 (comment) |
Yep, I unfortunately see similar issues to what you are running into sometimes. They do appear to be bleak / OS based. I agree that there needs to be more work done here to make everything more robust via both digging into the issues to file bleak bugs as needed as well as handling errors better in Open GoPro. Ultimately though, I have a suspicion that the Windows bluetooth drivers are just not very stable. In any case, I'll close this since the original issue is fixed. |
@leeprevost I somehow missed your link to the bleak issue above but ended up just stumbling there independently! Anyway, I wish I would have seen that because this is certainly an issue in the Open GoPro repo. I've opened a new bug to fix it: #39 |
@tcamise-gpsw Lots of new discussion going on #hbldh/bleak#367 but it seems folks are mainly focused on linux. I think its a windows problem too. |
Got error messsage when running demo.
$ gopro-video
Traceback (most recent call last):
File "c:\users\lee\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\lee\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\lee\Anaconda3\Scripts\gopro-video.exe_main.py", line 4, in
File "c:\users\lee\anaconda3\lib\site-packages\open_gopro_init.py", line 7, in
from open_gopro.gopro import GoPro
File "c:\users\lee\anaconda3\lib\site-packages\open_gopro\gopro.py", line 28, in
from open_gopro.ble_commands import BleSettings, BleStatuses, BleCommands, BLECommunicator
File "c:\users\lee\anaconda3\lib\site-packages\open_gopro\ble_commands.py", line 269
def set_shutter(self, shutter: params.Shutter, /) -> GoProResp:
^
SyntaxError: invalid syntax
My environment:
OS Name Microsoft Windows 10 Pro
Version 10.0.19041 Build 19041
Processor Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz, 3096 Mhz, 4 Core(s), 8 Logical Processor(s)
BIOS Version/Date Dell Inc. 1.14.1, 12/17/2020
The text was updated successfully, but these errors were encountered: