python-msp430-tools icon indicating copy to clipboard operation
python-msp430-tools copied to clipboard

'bytearray' object has no attribute 'encode'

Open WaltzKing opened this issue 7 years ago • 1 comments

Trying to run msp430.bsl5.uart and getting the error "'bytearray' object has no attribute 'encode'". This is with Python 2.7.12. Is this a Python2 vs. Python3 issue?

C:\work>python -m msp430.bsl5.uart -p com11 -v testhex3.txt Debug is False Verbosity level set to 2 Python version: 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] pySerial version: 3.4 action list: program_file() reset() Programming... Write segment at 0x4600 64 bytes

An error occurred: 'bytearray' object has no attribute 'encode' Cleaning up after error...

WaltzKing avatar Jan 25 '18 17:01 WaltzKing

I do not believe this is a Python2 vs Python3 issue. I see the same failure in Python 3.6. The error message has changed slightly to: "AttributeError: 'bytes' object has no attribute 'encode'"

psheph avatar Nov 08 '19 19:11 psheph