Software and call Class

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
giants
Posts: 33
Joined: Fri Apr 26, 2019 2:07 pm

Software and call Class

Post by giants » Sun May 19, 2019 4:34 pm

Hello everyone!
i'm here again for ask your help.
1) I use uPyCraft V1.1 for program my ESP8266 it's a good program or there are any other work much better ?
2) I wrote my first class ,but when i try to download gave me one error InportError: no module named 'RFD77402' is because didn't find where my class is ? i need the use path ? if yes can you help me please

Thank you so much
Sergio

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

Re: Software and call Class

Post by jimmo » Thu May 23, 2019 12:26 am

giants wrote:
Sun May 19, 2019 4:34 pm
1) I use uPyCraft V1.1 for program my ESP8266 it's a good program or there are any other work much better ?
It seems fine! This is more of a personal choice. It looks like it makes it easy to get files on/off the ESP8266 so that's good... (this is the usual thing that people have trouble with because there's only a serial interface, no easy USB filesystem like on the pyboards).
giants wrote:
Sun May 19, 2019 4:34 pm
2) I wrote my first class ,but when i try to download gave me one error InportError: no module named 'RFD77402' is because didn't find where my class is ? i need the use path ? if yes can you help me please
Sounds like it. If you have a line `import RFD77402` then it's expecting to find a file called `RFD77402.py` in the search path (which most of the times means just put it in the same directory as main.py). It's case sensitive too.

Some things to try:
- Can you open the REPL (serial console) on the device and run

Code: Select all

import os
os.listdir()
That will confirm that the file is there. If not, you'll have to figure out how to get uPyCraft to copy the file alongside main.py.
- If the file is there, try running

Code: Select all

import RFD77402

User avatar
dhylands
Posts: 3588
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Software and call Class

Post by dhylands » Thu May 23, 2019 3:39 pm

The search path for importing is found in sys.path

giants
Posts: 33
Joined: Fri Apr 26, 2019 2:07 pm

Re: Software and call Class

Post by giants » Thu May 23, 2019 4:41 pm

Thank you soo much for the help.
Sergio

Post Reply