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

Objc: module object has no attribute 'setSignatureForSelector' #92

Closed
roechi opened this issue Oct 11, 2016 · 2 comments
Closed

Objc: module object has no attribute 'setSignatureForSelector' #92

roechi opened this issue Oct 11, 2016 · 2 comments

Comments

@roechi
Copy link

roechi commented Oct 11, 2016

Hi, I am new to this and trying to figure out the following problem:

Running nxt_test (or any other script for that matter) results in the following error. Apparently there is an issue with pyobjc. Im running Python 2.7.12 and lightblue 0.4 on OSX 10.12.

Error while running test:
File "nxt_test", line 25, in
b = nxt.locator.find_one_brick(debug=debug)
File "/usr/local/lib/python2.7/site-packages/nxt/locator.py", line 112, in find_one_brick
for s in find_bricks(host, name, silent, method):
File "/usr/local/lib/python2.7/site-packages/nxt/locator.py", line 51, in find_bricks
import bluesock
File "/usr/local/lib/python2.7/site-packages/nxt/bluesock.py", line 18, in
import lightblueglue as bluetooth
File "/usr/local/lib/python2.7/site-packages/nxt/lightblueglue.py", line 17, in
import lightblue
File "/usr/local/lib/python2.7/site-packages/lightblue/init.py", line 160, in
from _lightblue import *
File "/usr/local/lib/python2.7/site-packages/lightblue/_lightblue.py", line 27, in
import _IOBluetooth
File "/usr/local/lib/python2.7/site-packages/lightblue/_IOBluetooth.py", line 61, in
objc.setSignatureForSelector("IOBluetoothSDPServiceRecord",
'module' object has no attribute 'setSignatureForSelector'

Thanks for any help.

@tcwan
Copy link
Contributor

tcwan commented Dec 28, 2016

There were some Bluetooth driver changes in MacOS since 10.8, which results in the error you see.
I think there's no solution for using lightblue on MacOS 10.12 unless there are newer patches available.
Take a look at my comments in #95

@dlech
Copy link
Contributor

dlech commented Apr 28, 2018

Bluetooth on macOS should be fixed by #147. You will need to create a config file such as this:

[Brick]
name = NXT
host = 00:16:53:00:00:00
strict = 0
method = usb=True, bluetooth=False, device=True

This will tell nxt-python to use the Bluetooth serial port created by macOS automatically (this is what device=True is for). No python bluetooth packages required.

@roechi roechi closed this as completed Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants