Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

ImportError: No module named 'ow' Python 3.5.3


Posted by:

Kaiden Avatar


I started a project in Pyton 3. I use Tkinter to make a graphical interface of my project. I use a Raspberry. I want to use 1-wire to control sensors, so I use owfs with i2c.

After exchanging wih someone, he told me that Python 3 did not use the right way to find "ow".

Then I decided to try Python 2 and it seems to work. A different error appears.

I use this code for test :

import ow

for sensor in sensorlist:
print('Device Found')
print('Address:' + sensor.address)
print('Family:' +
print('ID:' +
print('Type:' + sensor.type)

In Python 2 the error comes from ow.init line 224 "Raise exNoController".

My problem is that I want to use "ow" in python 3 but i can't access it. Do you have an idea to solve my problem ?

Maybe I've to use : python3 -m pip install ****** ? I should replace the stars by ?




Posted by:

andrew Avatar

United Kingdom

andrew Twitter  andrew Website  


The Raise exNoController error is probably being caused by the owserver not running. There is a thread in this forum post with someone else who had the same problem and a way to fix it. Hopefully, this is the same problem you are having.

python-ow is not available in Python 3 but it is possible to access the 1-wire sensors directly through the file system. The code below shows how to mount owfs using a subprocess call and then read the temperature from a sensor by accessing it directly through the file system. You would need to update the Sensor1 variable to point to the path of your 1-wire sensor. This method should work with python 2 and 3.

import os
import subprocess
import time

# mount owfs["owfs", "--i2c=ALL:ALL", "--allow_other", "/mnt/1wire/"])

# 1 wire temperature sensors
Sensor1 = "/mnt/1wire/10.BA7392020800/temperature"

varSensor1Value = 0.0

def get_1wire_sensor(path):
# Function to read 1-Wire sensors using OWFS
f = open(path, "r")
text = f.readlines()
return float(text[0]) + 3
print("getwiretemp failed")
return 88

while (True):
varSensor1Value = get_1wire_sensor(Sensor1)


Posted by:

Kaiden Avatar

Hi Andrew,

Thanks for the support.

I've test your code and i think that will solve my problem, but now, there is actually this problem with owserver... i get "getwiretemp failed 88" when i execute the code.

I've follow all your tutorial but i've problem when i write this command: sudo /opt/owfs/bin/owserver -c /etc/owfs.conf --pid-file /var/run/owfs/

It shows me an error: sudo: /opt/owfs/bin/owserver : command not found.

Where's the problem ?




Posted by:

Kaiden Avatar


Many thanks for your help, that has fixed the problem.

I found the second problem, i forgot to change the sensor "Sensor1" That's why there was this problem.

Thanks a lot for your help !


Sign in to post your reply

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.