ImportError: no module named 'upower'

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
Philosophix
Posts: 24
Joined: Wed Jan 02, 2019 11:45 am

ImportError: no module named 'upower'

Post by Philosophix » Sat Jan 19, 2019 12:50 pm

I'm trying to use the BkpRAM from the upower module (https://github.com/peterhinch/micropyth ... /UPOWER.md) but I'm getting the following error:
Traceback (most recent call last):
File "main.py", line 6, in <module>
ImportError: no module named 'upower'
MicroPython v1.9.1 on 2017-06-11; PYBv1.1 with STM32F405RG

Any ideas?

Philosophix
Posts: 24
Joined: Wed Jan 02, 2019 11:45 am

Re: ImportError: no module named 'upower'

Post by Philosophix » Thu Jan 24, 2019 9:22 am

Doesn't anyone have a clue?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ImportError: no module named 'upower'

Post by Roberthh » Thu Jan 24, 2019 11:21 am

What exactly did you try. Without showing the code that failed almost no-one can help you.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: ImportError: no module named 'upower'

Post by pythoncoder » Thu Jan 24, 2019 6:19 pm

You need to copy upower.py to the Pyboard: to the SD card if you're using one, otherwise to the internal flash.

This applies to all user-contributed code: it isn't officially supported so needs to be installed before use.
Peter Hinch
Index to my micropython libraries.

Post Reply