Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Can no longer reference an I2C address which isn't present.

916 Views - Created 04/02/2021


Posted by:

PeterB Avatar


I have an application running on Pi3/ArchLinuxARM (using ABE Python libraries maybe six to twelve months old).

I am moving the application to Pi4/RasPiOS Lite, and up to date ABE libraries..

I find that a call such as "iop1=IOPi(0x20)" now fails if address 20 doesn't exist on the I2C bus whereas it didn't cause a problem previously. Clearly, I will be able program around this, but it caught me out.

Is this change because of Pi3 -> Pi4 (unlikely), ArchLinux -> Debian (possible) or updated libraries (most likely)?

The error reported is:

 Traceback (most recent call last):
File "", line 57, in <module>
File "", line 21, in main
File "/home/automate/", line 89, in Load
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.7/dist-packages/IOPi/", line 117, in __init__
self.__bus.write_byte_data(self.__ioaddress, self.IOCON, self.__conf)
OSError: [Errno 121] Remote I/O error


Posted by:

andrew Avatar

United Kingdom

andrew Twitter  andrew Website  

Hello Peter

I have made some changes to the IO Pi library over the last year, mostly optimizing the code and adding more validation and error handling.

Having said that the "OSError: [Errno 121] Remote I/O error" message is not one of the changes I have made and I believe it is a part of the I2C class that comes with Python so the error showing up now could be due to the move from ArchLinux to Debian.

You can find a list of the changes that I made to the IO Pi library in the change log in our GitHub repository. The last time I made a change to the library that would break backward compatibility was in 2017 when the IOPi class was renamed from ABE_IOPi.


Posted by:

PeterB Avatar


Thanks for that info, Andrew. When I have the new environment fully debuged and running live, I will have a go at updating the ABE librariy on the ArchLinux (current live) system, just to prove your deduction.

This would suggest that there is some customisation of (fairly) standard libraries for different distributions.

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.