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
-
@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
-
there is only one pysense.py file....
How do you checked this? From atom plugin?
Better look into device by ftp.
-
@spoon
Ok then maybe the contents have some problem? Try erasing it e.g.os.unlink('/flash/pysense.py')
, re-upload and try again.
-
@jmarcelino there is only one pysense.py file....
-
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