-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Using code loaded with upip on the Unix build, I get
MicroPython v1.16-243-gd608d0ed7 on 2021-08-29; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import pickle
>>> with open('20210831', 'r') as f:
... a = pickle.load(f)
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/home/adminpete/.micropython/lib/pickle.py", line 11, in load
File "/home/adminpete/.micropython/lib/pickle.py", line 15, in loads
AttributeError: 'str' object has no attribute 'decode'
>>>
Commenting out line 15 fixes the problem with my data.
There is another issue in that the code downloaded does not match that in micropython-lib. Both have the error, but in the micropython-lib version it is on a different line. While the hack has fixed my immediate problem it would be interesting to know why these versions differ and which is correct.
Metadata
Metadata
Assignees
Labels
No labels