Can't import 'onewire' module


#1

Hallo,
I am new with Atom and facing a problem. Basically, i downloaded the onewire librabry from Github, which contains two.py files : ds18x20.py and onewire.py. the thing is, when I try to import it from the console, I got the following message : ImportError : no module named onewire. I do not understand, because I put the folder in my project so it appears in the tab on Atom as well, next to my main.py code and everything.
I can provide you with more details and further informations if my issue was not clear enough.
Thanks


#2

What console? You’re clearly using a package, but you haven’t identified it. In order for someone on this forum to understand what’s going on, we need to be able to reconstruct the entire workflow.


#3

I am using a REPL command called Pymakr (which I get by installing a package in Atom). For now, I have put the entire code which contains the definition of the Onewire and DS18x20 classes and their functions in main.py, but this makes the code very heavy.


#4

Which one?


#5

I get the Pymakr console if I install the Pymakr package.


#6

Try running os.getcwd() and sys.path() inside the Pymakr console and let us know what you get back.


#7

With os.getcwd(), i get : ‘/flash’ and after doing import sys and doing sys.path() or even print(sys.path()), i get : TypeError: ‘list’ object is not callable.