lib folder "not working"
-
I am using an LoPy with an pysense-board.
I am trying to import Pysense (from pysense import Pysense) which is placed in the lib folder.
i am always getting this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'pysense.Pysense'it doesn't matter if pycoproc.py is on the same level as main.py or in the lib folder --> same Error
it works when i put all the files on the same level like main.py
sys.path looks like this:['', '/flash', '/flash/lib'], so it should work i guess.i am working on mac os x with Atom and pymakr plug in.
any recommendations? thx
-
IIRC this can happen if you have a file named pysense.py in your main /flash folder as well as /flash/lib
Make sure you only have one pysense.py
-
@jmarcelino there is only one pysense.py file....
-
@spoon
Ok then maybe the contents have some problem? Try erasing it e.g.os.unlink('/flash/pysense.py'), re-upload and try again. -
there is only one pysense.py file....
How do you checked this? From atom plugin?
Better look into device by ftp. -
@livius thx for your advice, there haven't been a second pysense.py but a lot of other crap and folders, i deleted them now it is working fine! Thank you! i will now use ftp to upload my libs or at least check if everything is ok
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login