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

intelhex compat.py broken in Python 3.9 #1

Closed
ih8ms opened this issue Jun 14, 2021 · 1 comment
Closed

intelhex compat.py broken in Python 3.9 #1

ih8ms opened this issue Jun 14, 2021 · 1 comment

Comments

@ih8ms
Copy link

ih8ms commented Jun 14, 2021

Running Ubuntu 21.04 with Python 3.9.5:

./lpc81x_isp.py
Traceback (most recent call last):
  File "/home/sbreit/git/LPC81x-ISP-tool/./lpc81x_isp.py", line 63, in <module>
    from intelhex import IntelHex, HexRecordError
  File "/home/sbreit/git/LPC81x-ISP-tool/intelhex/__init__.py", line 44, in <module>
    from intelhex.compat import (
  File "/home/sbreit/git/LPC81x-ISP-tool/intelhex/compat.py", line 60, in <module>
    array_tobytes = getattr(array.array, "tobytes", array.array.tostring)
AttributeError: type object 'array.array' has no attribute 'tostring'

'tostring' is deprecated and was removed in Python 3.9.5. There also is an issue in the python-tostring project: python-intelhex/intelhex#45

For me, renaming the intelhex folder and using python3-intelhex from the apt repo fixed the issue.

@laneboysrc
Copy link
Owner

Thanks for reporting, I removed the outdated intelhex copy and added instructions how to install the required modules.

cheers, Werner

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

2 participants