Closed superbonaci closed 4 years ago
What is in the first line of these to files? To use with python3, you need install intelhex with pip3.
Those files are images from block devices.
Python 2.7 has reached end-of-life, please try to reproduce this with Python 3 (see above)
With pip3:
pip3 install intelhex
Collecting intelhex
Using cached https://files.pythonhosted.org/packages/bf/77/bf670318b3db325c71e2ac6a90b7bcfdf9fc739b7cf6aebb31715721623e/intelhex-2.2.1-py2.py3-none-any.whl
Installing collected packages: intelhex
Successfully installed intelhex-2.2.1
Still fails:
python3 --version
Python 3.7.5
python3 hexdiff.py device1.raw device2.raw
Traceback (most recent call last):
File "hexdiff.py", line 90, in <module>
sys.exit(main())
File "hexdiff.py", line 84, in main
ih1 = IntelHex(fname1)
File "/home/adams/.local/lib/python3.7/site-packages/intelhex/__init__.py", line 90, in __init__
self.loadhex(source)
File "/home/adams/.local/lib/python3.7/site-packages/intelhex/__init__.py", line 212, in loadhex
decode(s, line)
File "/home/adams/.local/lib/python3.7/site-packages/intelhex/__init__.py", line 123, in _decode_record
raise HexRecordError(line=line)
intelhex.HexRecordError: Hex file contains invalid record at line 1
I don't think raw files are IntelHex files. Probably you want to see files differences? This utility hexdiff.py is intended to be used with IntelHex files (file extension .hex).
чт, 23 апр. 2020 г. в 00:04, superbonaci notifications@github.com:
Still fails:
python3 hexdiff.py device1.raw device2.raw Traceback (most recent call last): File "hexdiff.py", line 90, in
sys.exit(main()) File "hexdiff.py", line 84, in main ih1 = IntelHex(fname1) File "/home/adams/.local/lib/python3.7/site-packages/intelhex/init.py", line 90, in init self.loadhex(source) File "/home/adams/.local/lib/python3.7/site-packages/intelhex/init.py", line 212, in loadhex decode(s, line) File "/home/adams/.local/lib/python3.7/site-packages/intelhex/init.py", line 123, in _decode_record raise HexRecordError(line=line) intelhex.HexRecordError: Hex file contains invalid record at line 1 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/python-intelhex/intelhex/issues/38#issuecomment-618039779, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUIG4Y3BKP5IEP6NEZBSTRN5LWPANCNFSM4MNO7SFA .
No, my files are not IntelHex files. I thought the script was general purpose. Thanks for clarification.
hexdiff.py version 2.2.1