Python3 error: builtins.TypeError: cannot extend bitarray with
jranma opened this issue · 1 comments
I get his error running hblink3
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/twisted/python/log.py", line 80, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python3.9/dist-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python3.9/dist-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/usr/local/lib/python3.9/dist-packages/twisted/internet/posixbase.py", line 487, in _doReadOrWrite
why = selectable.doRead()
--- <exception caught here> ---
File "/usr/local/lib/python3.9/dist-packages/twisted/internet/udp.py", line 254, in doRead
self.protocol.datagramReceived(data, addr)
File "/opt/HBlink3/hblink.py", line 603, in peer_datagramReceived
self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data)
File "/opt/HBlink3/./bridge.py", line 1047, in dmrd_received
self.group_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _dtype_vseq, _stream_id, _data)
File "/opt/HBlink3/./bridge.py", line 817, in group_received
dmrbits = dmrbits[0:116] + _target_status[_target['TS']]['TX_EMB_LC'][_dtype_vseq] + dmrbits[148:264]
builtins.TypeError: cannot extend bitarray with 'bytes', use .pack() or .frombytes() instead
I'm using python3 on linux debian
What version of bitarray
is your current HBLink using?
import bitarray
print("BitArray: %s" % bitarray.__version__)
OR
pip show bitarray
If you're running hblink3 as a docker container, you can:
docker exec -it $CONTAINER python -c "import bitarray; print(\"BitArray: %s\" % bitarray.__version__);"
OR
docker exec -it $CONTAINER pip show bitarray
2.6.1
was released 2022-12-18
2.6.0
was released 2022-07-19
Full Changelog
Nothing has changed in that section of bridge.py
that is generating the error in ~4 years, so my money is on something unexpected changing in the bitarray
package since the requirements.txt
file does not pin a specific version, only specifying bitarray>=2.3.5
...
Since this project does not use commit tags, provide a CHANGELOG
, include a VERSION
file, or use any sort of image tagging for the 'official' docker image beyond :latest
it's going to be incredibly difficult to provide any sort of image provenance, except for the image digest existing.
Perhaps you can fill in some of the above information and someone might be inclined enough to start bisecting source commits to figure out what went wrong.