self.bus = smbus.SMBus(self.busNumber) IOError

Hello Everyone,

I am building my first bot to run on a raspberry pi.
However, I have run into an issue with the following while trying to get
a test scrip to load. I have been digging for answers for the past few days
and can not find a solution that solves my issue. Does anyone know any
solutions?


File "PicoBorgRev.py", line 234, in Init self.bus = smbus.SMBus(self.busNumber) IOError: [Errno 2] No such file or directory.

thank you for your time,
--Nicholas

piborg's picture

What is happening is that the PicoBorg Reverse script is having trouble talking with the board itself.

There are a few reasons this could be the case:

  1. The I2C driver might not be running
  2. The script might be trying to use the wrong bus
  3. There may be a cabling problem between the Raspberry Pi and the PicoBorg Reverse

If you could answer these questions it will help us determine which is the problem:

  1. What lines are printed by the script prior to the error line?
  2. What result do you get running: sudo i2cdetect -y 0
  3. What result do you get running: sudo i2cdetect -y 1
  4. Does the LED on the PicoBorg Reverse come on when you connect power to the Raspberry Pi?
  5. What result do you get running: uname -a

Answers in order:

2. error could not open file '/dev/i2c-0' or '/dev/i2c/0': No such file or directory
3. 0 1 2 .... f (prints a matrix )
00: -- -- --- --

in Row 40, col 4, Number 44 appears.

4. Yes a red led lights up.
5. Linux pi.Nicholas 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 arm7l GNU/Linux

Does this help explain any issue I might have?
Also, thank you for replying

Nicholas

I found the issue, I did not notice a connection that was not fully seated properly!
So this one is on me! Can not wait to get to work programming this thing!

Thanks for everything,
Nicholas

Subscribe to Comments for "self.bus = smbus.SMBus(self.busNumber) IOError"