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

crc16 PY_SSIZE_T_CLEAN #29

Open
piferrari opened this issue Feb 5, 2024 · 0 comments
Open

crc16 PY_SSIZE_T_CLEAN #29

piferrari opened this issue Feb 5, 2024 · 0 comments

Comments

@piferrari
Copy link

After preparing my virtual environment

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python3 --version
Python 3.10.12
$ python3 -m pip install -r requirements.txt
$ python3 . --generate-config > nuki.yaml

It fail to pairing with this message:

File "/home/ubuntu/RaspiNukiBridge/./nuki.py", line 643, in pair
    cmd = self._prepare_command(NukiCommand.REQUEST_DATA.value, payload)
  File "/home/ubuntu/RaspiNukiBridge/./nuki.py", line 269, in _prepare_command
    crc = crc16.crc16xmodem(message, 0xffff).to_bytes(2, "little")
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

The problem is known here

I temporarily fixed the problem using this fork in the requirements.txt file

requirements.txt

aiohttp==3.8.1
bleak==0.14.0
PyNaCl==1.3.0
PyYAML==6.0
git+https://github.com/ljelen/pycrc16.git

Best regards

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

1 participant