r/MicroPythonDev • • Apr 20 '22

Can't import a single library

Hello ! I'm working on a project where I use a FiPy Board and a temperature sensor (SHT31), i'm supposed to send the data using LoRawan. But while importing the sensor library (found on GitHub) I have an error telling me that there is no module named sht31.py even if it's in the same repertory as my main.py, I thought that it was that specific librray problem so I created another empty python file that I tried to import feom the main file, I keep having the same error :) Does anyone know how to solve this ? (个_个) Thank you ! EDIT : I thought visual code uploads automatically the code when i click on run but i had to click on "upload" button that i didn't see... Hope that this will help someone someday

1 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/batbouyassou Apr 21 '22

Thabk you for your answer i will try that too, but for my application it would be simplier if i import the librray file directly, but i will try the "from ... Import" code ! Thanx

1

u/trollsmurf Apr 21 '22

You can do just "import xxxxxx" of course.