Ampy error when using git command

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
joe
Posts: 2
Joined: Mon Jan 27, 2020 1:47 am

Ampy error when using git command

Post by joe » Mon Jan 27, 2020 1:53 am

Hi, I just setup ampy for use with a esp8266 board and I get the error shown below when running the get command. I tried installing

Code: Select all

ubinascii
via

Code: Select all

pip3 install micropython-cpython-ubinascii
but still get the same result.

Thanks

Code: Select all

$ ampy --baud 115200 --port /dev/ttyUSB0 ls
/boot.py
/testing.py
$ ampy --baud 115200 --port /dev/ttyUSB0 get testing.py
Traceback (most recent call last):
  File "/usr/local/bin/ampy", line 11, in <module>
    load_entry_point('adafruit-ampy==1.0.8.dev19+g2443bfc', 'console_scripts', 'ampy')()
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/adafruit_ampy-1.0.8.dev19+g2443bfc-py3.7.egg/ampy/cli.py", line 126, in get
  File "/usr/local/lib/python3.7/dist-packages/adafruit_ampy-1.0.8.dev19+g2443bfc-py3.7.egg/ampy/files.py", line 82, in get
  File "/usr/local/lib/python3.7/dist-packages/adafruit_ampy-1.0.8.dev19+g2443bfc-py3.7.egg/ampy/files.py", line 74, in get
  File "/usr/local/lib/python3.7/dist-packages/adafruit_ampy-1.0.8.dev19+g2443bfc-py3.7.egg/ampy/pyboard.py", line 274, in exec_
ampy.pyboard.PyboardError: ('exception', b'', b'Traceback (most recent call last):\r\n  File "<stdin>", line 3, in <module>\r\nImportError: no module named \'ubinascii\'\r\n')

User avatar
jimmo
Posts: 1139
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: Ampy error when using git command

Post by jimmo » Mon Jan 27, 2020 3:39 am

I think the command you ran (using "pip3" will install this on your PC -- the error from ampy is about ubinascii on the device.

It's surprising though, because the ESP8266 includes ubinascii. Can you try connecting to the REPL and running:

Code: Select all

import ubinascii
and see if that works?

Which firmware are you using?

joe
Posts: 2
Joined: Mon Jan 27, 2020 1:47 am

Re: Ampy error when using git command

Post by joe » Mon Jan 27, 2020 2:29 pm

Thanks for the reply, I was mistaken and thought that output mean that ubinascii could not be located on my system. I was running adafruit-circuitpython-feather_huzzah-3.1.2.bin when I got the error but I re flashed to esp8266-20191220-v1.12.bin and no longer get the error. When running circuit python

Code: Select all

import ubinascii
outputs

Code: Select all

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'ubinascii'
So the issue is specific to circuit python

Post Reply