scientifichackers / ampy

MicroPython Tool - Utility to interact with a MicroPython board over a serial connection.
MIT License
723 stars 157 forks source link

Cannot upload file with specific starting character on Windows #90

Closed lubosmato closed 4 years ago

lubosmato commented 4 years ago

How to reproduce (only Windows)

Upload a file using Files.put. File must be inside a folder and a filename must start with a character from set: a, b, f, n, r, t, v, o, x. For example imagine this filepath folder\file_starting_with_f.py. Windows uses \. The problem occurs on line https://github.com/scientifichackers/ampy/blob/master/ampy/files.py#L214

# filename == "folder\file_starting_with_f.py"
# '\f' is escape character so opening a file with escape character will fail with EACCES
self._pyboard.exec_("f = open('{0}', 'wb')".format(filename))

Maybe also causing an issue which breaks tests on Windows #72

devxpy commented 4 years ago

Was this solved? If so, can tell us how?

lubosmato commented 4 years ago

No, it wasn't because it is not an issue in ampy. I thought it is related to ampy project but the issue is related to intellij-micropython which uses ampy. Feel free to delete this issue.