sony-headphones-control-py icon indicating copy to clipboard operation
sony-headphones-control-py copied to clipboard

Module 'lightblue' has no attribute 'findservices'

Open Ewwwer opened this issue 2 years ago • 3 comments

Hi, it looks like a very good project and I want to try it but after installing Setup.py I run the script and it returns this error:


Searching for 00:18:09:9D:ED:FC...
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/sony-headphones-control", line 4, in <module>
    __import__('pkg_resources').run_script('SonyHeadphonesControl==0.1', 'sony-headphones-control')
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 651, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1448, in run_script
    exec(code, namespace, namespace)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/SonyHeadphonesControl-0.1-py3.10.egg/EGG-INFO/scripts/sony-headphones-control", line 19, in <module>
    service_matches = bluetooth.find_service(uuid=uuid, address=addr)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bluetooth/macos.py", line 49, in find_service
    dresults = lightblue.findservices(addr=address, name=name)
AttributeError: module 'lightblue' has no attribute 'findservices'

Do you know what it could be?
Thank you very much

Ewwwer avatar Oct 29 '21 19:10 Ewwwer

Hi! Maybe python 3.10 is the problem, I'm using 3.9.7 and there's no errors regarding "lightblue" module.

impankratov avatar Oct 30 '21 19:10 impankratov

Getting the same in python 3.9.9

bitmorse avatar Jan 31 '22 11:01 bitmorse

@bitmorse @Ewwwer

After f45807d1988cf7564455714aa85c1cafefe66c04 project uses https://pypi.org/project/pybluez-updated/ which seems to be more up-to-date version.

At least for me that alone made it possible to run the project on python 3.

Can you try it out?

impankratov avatar Feb 17 '23 14:02 impankratov