Posts: 1
Joined: Sun Aug 12, 2018 10:28 pm

OSError: [Errno 121] Remote I/O error

Sun Aug 12, 2018 10:57 pm

Hello there!

I have a Raspberry PI 3 with a Pimoroni Explorer HAT as a result I have a beautiful robot.
I have write a python program in order to move my robot in my house.

When I turn ON the raspberry (with the original raspberry charger 5V / 2.5 A) and run the python program everything is OK and the robot move around my house. Of course with a electricity cable, so sad :cry: :cry: :cry:

However, when I use my lithium battery (5V / 1A) cause I like cable less 8-) , I have the following python error and crash it after the first movements :(

Code: Select all

Exception in thread Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
  File "/usr/local/lib/python3.4/dist-packages/cap1xxx.py", line 231, in run
    if self.todo() == False:
  File "/usr/local/lib/python3.4/dist-packages/cap1xxx.py", line 456, in _poll
    if self.wait_for_interrupt():
  File "/usr/local/lib/python3.4/dist-packages/cap1xxx.py", line 377, in wait_for_interrupt
    status = self._interrupt_status() # self._read_byte(R_MAIN_CONTROL)
  File "/usr/local/lib/python3.4/dist-packages/cap1xxx.py", line 367, in _interrupt_status
    return self._read_byte(R_MAIN_CONTROL) & 1
  File "/usr/local/lib/python3.4/dist-packages/cap1xxx.py", line 494, in _read_byte
    return self.i2c.read_byte_data(self.i2c_addr, register)
OSError: [Errno 121] Remote I/O error

Could be the power battery is the main issue?

Thanks in advance! :P

Posts: 11416
Joined: Tue Jul 17, 2012 3:02 pm

Re: OSError: [Errno 121] Remote I/O error

Mon Aug 13, 2018 6:17 am

Could be the power battery is the main issue?
Hmm... If everything works when powered from the wall via cable but not when powered by the battery I think there might be a clue there...

Is your battery really only capable of 1 Amp ?

Given that this is a robot application I assume there are motors involved. Motors can take a lot of current. Drawing lots of current can cause battery voltages to drop which will cause things to start to fail.

Get bigger batteries. Ensure that the supply to the Pi never drops below 5v.

Posts: 1
Joined: Tue Jan 15, 2019 8:25 pm

Re: OSError: [Errno 121] Remote I/O error

Tue Jan 15, 2019 8:30 pm

Hey, just for the record, I had the exact same error, and replacing my batteries fixed it.

Return to “Python”