'module' object has no attribute 'TM1637'
Closed this issue · 5 comments
Hello,
I'm trying to use your code on a WEMOS D1 with MicroPython 1.9.4.
I can run the "import" commands for both, the tm1637 and the machine, but when I run the tm line, it fails with the following error:
import tm1637
from machine import Pin
tm = tm1637.TM1637(clk=Pin(5), dio=Pin(4))
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'TM1637'
Could you please let me know on how to fix this?
Kind regards,
Alex
Sounds like it may not have copied across successfully. Try putting tm1637.py on the board again and reset. Are you using ampy, rshell?
Alternatively, add it to your /modules folder and a frozen version will be compiled and added to your build.
Hi,
I used ampy to copy it over.
I removed it and copied it again, after downloading it from here, but I'm still getting the same error.
I will try a different board and adding to modules later.
Make sure you have downloaded the code itself and NOT the complete HTML page with code. I had the same issue and then I recognize, that despite of .py suffix, the file was HTML page.
Hi all,
I downloaded the zip file, so it was the real python file.
I reset the Wemos D1 (erase and re-uploaded esp8266-20180511-v1.9.4.bin).
Only uploaded the tm1637.py
Now it works. not sure what caused it to fail, but after a reload it works.
Thank you all.
Kind regards,
Alex
Issue is fixed now