Looking for any pointers on this.
I’m running a Powerhat (v1) on a Oratek Tofu (same 40 pin as the pi4) and experiencing some issues with the sixfab-power-python-api
in my own python script.
During testing this is the error I’m getting.
root@703fdb0:/app# python3
Python 3.10.4 (main, Apr 8 2022, 18:47:39) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from power_api import SixfabPower, Definition, Event
>>> api = SixfabPower()
>>> api.get_battery_level()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/power_api/power_api.py", line 472, in get_battery_level
command.create_command(command.PROTOCOL_COMMAND_GET_BATTERY_LEVEL)
File "/usr/local/lib/python3.10/site-packages/power_api/command.py", line 243, in create_command
(crc_high, crc_low) = self.calculate_crc16(buffer_send[0:PROTOCOL_HEADER_SIZE])
File "/usr/local/lib/python3.10/site-packages/power_api/command.py", line 327, in calculate_crc16
cal_crc = crc16.crc16xmodem(bytes(command))
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
I’m not even sure how to interpret this error message. Any suggestions?