You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to exec a local file on the target via 'exec' command seems to fail on Python 3.8.5.
$ nodemcu-uploader.py exec /tmp/tmp.yYUKAPNw0b/lfs-init.lua
opening port /dev/ttyUSB0 with 115200 baud
Execute XXX.lua
Traceback (most recent call last):
File "XXX/nodemcu-uploader_src/nodemcu-uploader.py", line 11, in <module>
main.main_func()
File "XXX/nodemcu-uploader_src/nodemcu_uploader/main.py", line 334, in main_func
uploader.exec_file(path)
File "XXX/nodemcu-uploader_src/nodemcu_uploader/uploader.py", line 367, in exec_file
content = from_file(path).replace('\r', b'').split('\n')
TypeError: a bytes-like object is required, not 'str'
This makes sense to me, as strings are given to replace(), split(), rstrip(), etc...
def from_file(path):
"""Returns content of file as 'bytes'.
Locally, I'm using a patch, which allows it to work as expected, though I haven't tested it extensively:
Trying to exec a local file on the target via 'exec' command seems to fail on Python 3.8.5.
This makes sense to me, as strings are given to replace(), split(), rstrip(), etc...
Locally, I'm using a patch, which allows it to work as expected, though I haven't tested it extensively:
The text was updated successfully, but these errors were encountered: