Git Product home page Git Product logo

Comments (9)

miketeachman avatar miketeachman commented on August 18, 2024

Same for Windows 7

from ampy.

devxpy avatar devxpy commented on August 18, 2024

Can you post the output without any arguments?

$ ampy -p com4 -b 115200 ls

Sidenote: please use the correct markdown. Put multi-line code in between 3 backticks

image

from ampy.

joewez avatar joewez commented on August 18, 2024

OK...

'''
C:\Users\Joseph>ampy -p com4 -b 115200 ls
boot.py
adc_test.py
app.py
aps_trusted.py
battlebot.py
bitmapfont.py
blink.py
bmp180_display.py
bmp180_test.py
button_async.py
button_dots.py
button_init.py
button_irq.py
button_test.py
captive_page.py
captive_server.py
carlos_clock.py
clock_demo.py
compass_test.py
config.py
custom_oled_test.py
dht_matrix.py
dht11_test.py
digit_clock.py
digit_test.py
dns_server.py
dnsquery.py
ds18b20_test.py
encoder_test.py
font5x8.bin
guess.py
gyro_test.py
hardware.py
hotspot_ftp.py
hotspot_web.py
initap.py
initwifi.py
lcd_test_1602.py
lcd_test_2004.py
life.py
lights.py
main.py
mastermind.py
matrix_bug.py
matrix_bug_blue.py
matrix_bug_red.py
matrix_demo.py
matrix_demo_blue.py
matrix_demo_red.py
matrix_particle.py
matrix_particle_red.py
matrix_read.py
matrix_read_blue.py
matrix_read_forever.py
matrix_scroll.py
matrix_scroll_blue.py
matrix_test.py
matrix_worm.py
matrix_worm_red.py
mqtt_test.py
npsoff.py
npstest.py
oled_demo.py
oled_demo2.py
oled_test.py
pcd_small.py
pcd_test.py
pixel.py
rgb.py
rtc.py
rtc_set.py
rtc_test.py
servo_demo.py
smalltext_test.py
smalltext_test2.py
starwars.py
strandtest.py
tft_test.py
tft_text.py
therm_test.py
thermo_demo.py
thermo_demo2.py
timers.py
tm1640_test.py
tones.py
uhttp.py
webrepl_cfg.py
widget.py
wifiboot.py
work_timer.py
wrapper.py
ws2812b_test.py
connect
dev
drivers
frozen
graphics
misc
profile
shields
umqtt
wwwroot
test.py
tft_dimensions.py
tft_random.py
tft_puzzle.py
tft_shield_test.py
tft_shield_test2.py
tft_shield_test3.py

C:\Users\Joseph>
'''

from ampy.

joewez avatar joewez commented on August 18, 2024

Here is another try at a subdirectory...

'''
C:\Users\Joseph>ampy -p com4 -b 115200 ls wwwroot
Traceback (most recent call last):
File "C:\Users\Joseph\AppData\Local\Programs\Python\Python37\Scripts\ampy-script.py", line 11, in
load_entry_point('adafruit-ampy==1.0.5', 'console_scripts', 'ampy')()
File "c:\users\joseph\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 722, in call
return self.main(*args, **kwargs)
File "c:\users\joseph\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\users\joseph\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1066, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\joseph\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\joseph\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\users\joseph\appdata\local\programs\python\python37\lib\site-packages\ampy\cli.py", line 162, in ls
for f in board_files.ls(directory, long_format=long_format):
File "c:\users\joseph\appdata\local\programs\python\python37\lib\site-packages\ampy\files.py", line 124, in ls
raise ex
File "c:\users\joseph\appdata\local\programs\python\python37\lib\site-packages\ampy\files.py", line 117, in ls
out = self.pyboard.exec(textwrap.dedent(command))
File "c:\users\joseph\appdata\local\programs\python\python37\lib\site-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 "", line 6, in \r\nOSError: [Errno 22] EINVAL\r\n')

C:\Users\Joseph>
'''

from ampy.

devxpy avatar devxpy commented on August 18, 2024

Have you tried prefixing the directory by a slash (/)?

Also, if you can, try this out using the master branch

$ git clone https://github.com/adafruit/ampy.git
$ cd ampy
$ pip install -e .

from ampy.

joewez avatar joewez commented on August 18, 2024

Adding the slash prefix makes no difference with 1.0.5.

The good new is that the master branch seems to work...

'''
D:\Development\ampy>ampy -p com4 -b 115200 ls wwwroot
/wwwroot/afm.html
/wwwroot/applications.html
/wwwroot/editkeys.html
/wwwroot/getting.html
/wwwroot/images
/wwwroot/index.html
/wwwroot/reference.html
/wwwroot/replintro.html
/wwwroot/resources.html
/wwwroot/scripts
/wwwroot/styles
/wwwroot/usage.html

D:\Development\ampy>
'''

Although it does hang when I do add the slash....FYI.

from ampy.

devxpy avatar devxpy commented on August 18, 2024

Alright. The master branch works because of this pull request.

Will check out why it hangs.

from ampy.

jerryneedell avatar jerryneedell commented on August 18, 2024

FWIW - on my linux box the subdir listing works - except for lib/

jerryneedell@Ubuntu-Macmini:~/projects/nrf52840/circuitpython$ ampy -p /dev/ttyUSB0 ls -r
/boot.py
/junk.py
/lib/adafruit_bus_device/__init__.py
/lib/adafruit_bus_device/i2c_device.mpy
/lib/adafruit_bus_device/spi_device.mpy
/lib/adafruit_sdcard.mpy
/main.py
/more_junk.py
/stuff.py
/test_boot.py
jerryneedell@Ubuntu-Macmini:~/projects/nrf52840/circuitpython$ ampy -p /dev/ttyUSB0 ls lib -r
/lib/adafruit_bus_device/__init__.py
/lib/adafruit_bus_device/i2c_device.mpy
/lib/adafruit_bus_device/spi_device.mpy
/lib/adafruit_sdcard.mpy
jerryneedell@Ubuntu-Macmini:~/projects/nrf52840/circuitpython$ ampy -p /dev/ttyUSB0 ls /lib -r
/lib/adafruit_bus_device/__init__.py
/lib/adafruit_bus_device/i2c_device.mpy
/lib/adafruit_bus_device/spi_device.mpy
/lib/adafruit_sdcard.mpy
jerryneedell@Ubuntu-Macmini:~/projects/nrf52840/circuitpython$ ampy -p /dev/ttyUSB0 ls lib/ -r
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-6.7-py3.6.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click-6.7-py3.6.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/dist-packages/click-6.7-py3.6.egg/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/dist-packages/click-6.7-py3.6.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/dist-packages/click-6.7-py3.6.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/adafruit_ampy-1.0.5-py3.6.egg/ampy/cli.py", line 194, in ls
  File "/usr/local/lib/python3.6/dist-packages/adafruit_ampy-1.0.5-py3.6.egg/ampy/files.py", line 171, in ls
  File "/usr/local/lib/python3.6/dist-packages/adafruit_ampy-1.0.5-py3.6.egg/ampy/files.py", line 164, in ls
  File "/usr/local/lib/python3.6/dist-packages/adafruit_ampy-1.0.5-py3.6.egg/ampy/pyboard.py", line 267, in exec_
ampy.pyboard.PyboardError: ('exception', b'', b'Traceback (most recent call last):\r\n  File "<stdin>", line 34, in <module>\r\n  File "<stdin>", line 31, in listdir\r\n  File "<stdin>", line 14, in _listdir\r\nOSError: [Errno 22] EINVAL\r\n')
jerryneedell@Ubuntu-Macmini:~/projects/nrf52840/circuitpython$ 

from ampy.

ladyada avatar ladyada commented on August 18, 2024

Hiya! We are discontinuing support for ampy, and will no longer be maintaining it. We are leaving this repository available for continued use. If you would like to take over supporting it, please contact us on the Adafruit Discord server and we can transfer the repository to you.
If you wish to continue developing it on your own, please fork the repository.

from ampy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.