python-sonicare icon indicating copy to clipboard operation
python-sonicare copied to clipboard

Fail to run on macOS

Open sclsj opened this issue 9 months ago • 1 comments

Hello! Tried with brand new venv with python 3.10 on macOS 12 (arm).

(venv) jin@Joy-MBP ~/python-sonicare (main)> python examples/gui/run.py
Traceback (most recent call last):
  File "/Users/jin/python-sonicare/examples/gui/run.py", line 11, in <module>
    ex = SonicareApplication(mac=get_mac())
  File "/Users/jin/python-sonicare/examples/gui/gui.py", line 19, in __init__
    device_manager=gatt.DeviceManager(adapter_name='hci0'),
TypeError: DeviceManager() takes no arguments

After removing the argument, I get

(venv) jin@Joy-MBP ~/python-sonicare (main)> python examples/gui/run.py
Traceback (most recent call last):
  File "/Users/jin/python-sonicare/examples/gui/run.py", line 11, in <module>
    ex = SonicareApplication(mac=get_mac())
  File "/Users/jin/python-sonicare/examples/gui/gui.py", line 17, in __init__
    self.client = SonicareClient(
  File "/Users/jin/python-sonicare/examples/gui/../../sonicare/sonicare.py", line 17, in __init__
    self.device = SonicareDevice(
  File "/Users/jin/python-sonicare/examples/gui/../../sonicare/device.py", line 9, in __init__
    super().__init__(mac_address, manager, managed)
TypeError: object.__init__() takes exactly one argument (the instance to initialize)

sclsj avatar Mar 29 '25 04:03 sclsj

Note that I'm getting this error while pip install -r requirements.txt:

(venv) jin@Joy-MBP ~/python-sonicare (main)> pip install -r requirements.txt
Requirement already satisfied: gatt==0.2.7 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (0.2.7)
Collecting PyQt5==5.14.0
  Using cached PyQt5-5.14.0.tar.gz (3.2 MB)
error: invalid-pyproject-build-system-requires

× Can not process PyQt5==5.14.0 from https://files.pythonhosted.org/packages/7c/5b/e760ec4f868cb77cee45b4554bf15d3fe6972176e89c4e3faac941213694/PyQt5-5.14.0.tar.gz (from -r requirements.txt (line 2))
╰─> This package has an invalid `build-system.requires` key in pyproject.toml.
    It contains an invalid requirement: 'sip >=5.0.1 <6'

note: This is an issue with the package mentioned above, not pip.
hint: See PEP 518 for the detailed specification.
WARNING: There was an error checking the latest version of pip.

which according to this QA is normal so I just removed the version number and it installed without issues.

sclsj avatar Mar 29 '25 04:03 sclsj