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

Commit 69924b4 forces any python 3 users to upgrade to python 3.10 (or use git checkout 56aed486ab77a882e96387abb9e2f2e02b977757) #631

Open
alfred-stokespace opened this issue Nov 5, 2024 · 0 comments
Labels
bug Something isn't working triage Needs to be reviewed and assigned

Comments

@alfred-stokespace
Copy link

Component
What is the bug in?

  • Tutorials

Describe the bug

│ ❱  37 async def connect_ble(notification_handler: noti_handler_T, identifier: str | None = Non   │
│    38 │   """Connect to a GoPro, then pair, and enable notifications                             │
│    39 │                                                                                          │
│    40 │   If identifier is None, the first discovered GoPro will be connected to.                │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

as per https://docs.python.org/3.10/whatsnew/3.10.html#pep-604-new-type-union-operator
that operator is new in 3.10

To Reproduce
Steps to reproduce the behavior:

  1. I have python version 3.9.5 (ubuntu 20.04)
  2. navigate to tutorial folder
  3. use python3 command to run tutorial_modules/tutorial_1_connect_ble/ble_connect.py
  4. you'll be told that TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Expected behavior
Docs state that 3.9 is supported. If that were true then the I should see...

python3 tutorial_modules/tutorial_1_connect_ble/ble_connect.py
INFO     14:07:55.695 Scanning for bluetooth devices...                                                                                                                ble_connect.py:55
ERROR    14:07:55.715 Connection establishment failed: [Errno 2] No such file or directory                                                                            ble_connect.py:107
WARNING  14:07:55.716 Retrying #0                                                                                                                                     ble_connect.py:108
INFO     14:07:55.717 Scanning for bluetooth devices...                                                                                                                ble_connect.py:55
ERROR    14:07:55.719 Connection establishment failed: [Errno 2] No such file or directory                                                                            ble_connect.py:107
WARNING  14:07:55.720 Retrying #1                                                                                                                                     ble_connect.py:108
INFO     14:07:55.721 Scanning for bluetooth devices...                                                                                                                ble_connect.py:55
ERROR    14:07:55.722 Connection establishment failed: [Errno 2] No such file or directory                                                                            ble_connect.py:107
WARNING  14:07:55.723 Retrying #2                                                                                                                                     ble_connect.py:108

Workaround
If I use this git command to rollback commits I can get to a version that does not have the union operator and the script appears to work as expected.

git checkout 56aed486ab77a882e96387abb9e2f2e02b977757

Hardware

  • Desktop if applicable [e.g. Windows]
    WSL Ubuntu

Additional context
Add any other context about the problem here.

@alfred-stokespace alfred-stokespace added the bug Something isn't working label Nov 5, 2024
@github-actions github-actions bot added the triage Needs to be reviewed and assigned label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs to be reviewed and assigned
Projects
None yet
Development

No branches or pull requests

1 participant