question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Syntax error on Raspberry Pi

See original GitHub issue
  • bleak version: 0.2.0
  • Python version: 3.5.3
  • Operating System: Raspbian Stretch

Description

Trying to run the discovery example from usage section in the documentation in a virtualenv on a raspberry pi with default python 3.5.3 installed.

What I Did

Saved the discovery code from the docs to discover.py

python3 -m venv venv
. venv/bin/activate
pip install bleak
 python3 discover.py
Traceback (most recent call last):
  File "discover.py", line 2, in <module>
    from bleak import discover
  File "/home/pi/venv/lib/python3.5/site-packages/bleak/__init__.py", line 47, in <module>
    from bleak.backends.bluezdbus.discovery import discover  # noqa
  File "/home/pi/venv/lib/python3.5/site-packages/bleak/backends/bluezdbus/discovery.py", line 6, in <module>
    from bleak.backends.device import BLEDevice
  File "/home/pi/venv/lib/python3.5/site-packages/bleak/backends/device.py", line 30
    return f"{self.address}: {self.name}"
                                        ^
SyntaxError: invalid syntax

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kmpmcommented, Nov 9, 2018

Discover is working now !, Stort tack från en dalslänning.

python3 ./discover.py
C3:B7:01:DD:30:99: C3:B7:01:DD:30:99
0reactions
hbldhcommented, Nov 9, 2018

Corrected in version 0.2.2 (c1f6581).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: SyntaxError: invalid syntax - Raspberry Pi Forums
I have a sense hat attached to my raspberry pi model b+. I would like the temperature to be displayed on the LED...
Read more >
How to fix SyntaxError: invalid syntax on a Raspberry Pi?
I have code wrote on Windows, compiles and works correctly, but fails on the raspberry pi. wrote some simple ...
Read more >
Why am I getting this syntax error in micropython?
You are getting syntax errors, because you made syntax mistakes in your Python code. Control-flow statements in python opening an indented ...
Read more >
Update script syntax errors on older Pi models #211 - GitHub
I have boards with a BOARD_INFO of 0x00000002 and 0x0000000f . These get an asterisk and newline inserted by hexdump as above. All...
Read more >
Can not install S3D on Raspberry Pi: Syntax error
I've downloaded the latest version for Linux 32-bit. This is what happens. Screenshot 2021-10-28 171259.png. Am I missing something, or is the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found