ampy error

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jmleczko
 
Posts: 2
Joined: Fri Oct 27, 2017 11:57 pm

ampy error

Post by jmleczko »

I've installed micropython on a nodemcu and have been playing around. Whenever I reset the board, or power down, i lose the network and webrepl settings. I've created a boot.py file and uploaded it using webrepl, but still lose everything upon power cycle. I tried installing ampy to verify if the boot.py file is in fact in the correct spot. However, when I try to run even ampy --help I get the following error...

lkdfldk@MacBook-Air:~/Downloads$ ampy --help
Traceback (most recent call last):
File "/usr/local/bin/ampy", line 11, in <module>
load_entry_point('adafruit-ampy==1.0.3', 'console_scripts', 'ampy')()
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 567, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2604, in load_entry_point
return ep.load()
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2264, in load
return self.resolve()
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2270, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Library/Python/2.7/site-packages/ampy/cli.py", line 30, in <module>
import ampy.files as files
ImportError: No module named files
lkdfldk@MacBook-Air:~/Downloads$


Anybody see this error and can offer guidance in a solution?

Thanks!

-John

User avatar
jmleczko
 
Posts: 2
Joined: Fri Oct 27, 2017 11:57 pm

Re: ampy error

Post by jmleczko »

Never mind, I figured it out.

I was trying to define a function within boot.py (following an example). I just eliminated the function and executed straight commands and now my network and webrepl get set up on boot.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”