ampy: Unable to list subdirectories
I’m unable to list subdirectories on an ESP32.
I’ve successfully created a subdirectory under /flash/ and copied a file into it using the following commands:
export AMPY_PORT=/dev/ttyUSB0
ampy mkdir /flash/new_dir
ampy put myscript.py /flash/new_dir/myscript.py
then when running:
ampy ls /flash/new_dir/
I’m getting the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/ampy/files.py", line 117, in ls
out = self._pyboard.exec_(textwrap.dedent(command))
File "/usr/local/lib/python3.6/dist-packages/ampy/pyboard.py", line 267, in exec_
raise PyboardError('exception', ret, ret_err)
ampy.pyboard.PyboardError: ('exception', b'', b'Traceback (most recent call last):\r\n File "<stdin>", line 6, in <module>\r\nOSError: [Errno 2] ENOENT\r\n')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/ampy", line 11, in <module>
load_entry_point('adafruit-ampy==1.0.5', 'console_scripts', 'ampy')()
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/ampy/cli.py", line 162, in ls
for f in board_files.ls(directory, long_format=long_format):
File "/usr/local/lib/python3.6/dist-packages/ampy/files.py", line 122, in ls
raise RuntimeError('No such directory: {0}'.format(directory))
RuntimeError: No such directory: /flash/new_dir/
I’m able to remove the subdirectory via:
ampy rmdir /flash/new_dir
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (3 by maintainers)
Looking at the code history,
-r
was added since 1.0.5 was released, and the version number wasn’t bumped yet. So the latest release (1.0.5) doesn’t include it. We need to make a new release.