# ERROR reading in XRPLib.defaults

**URL:** <https://xrp.discourse.group/t/error-reading-in-xrplib-defaults/155>\
**Category:** Python programming\
**Created:** [November 23, 2023, 2:46pm UTC](https://xrp.discourse.group/t/error-reading-in-xrplib-defaults/155 "2023-11-23T14:46:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@David](https://xrp.discourse.group/u/David)\
**Post date:** [November 23, 2023, 2:46pm UTC](https://xrp.discourse.group/t/error-reading-in-xrplib-defaults/155/1 "2023-11-23T14:46:24Z")

</div>

I have the following code in my hello world example:

from XRPLib.defaults import \*  
print(“hello”)

I get the following error:

MicroPython v1.20.0 on 2023-04-26; Raspberry Pi Pico W with RP2040  
Type “help()” for more information.

> > >

OKTraceback (most recent call last):  
File “”, line 5, in   
File “hello.py”, line 4, in   
File “/lib/XRPLib/defaults.py”, line 19, in   
File “/lib/XRPLib/imu.py”, line 26, in get\_default\_imu  
File “/lib/XRPLib/imu.py”, line 59, in **init**  
File “/lib/XRPLib/imu.py”, line 155, in is\_connected  
File “/lib/XRPLib/imu.py”, line 106, in \_getreg  
OSError: [Errno 110] ETIMEDOUT

> 

I went into my defaults.py file and commented out line 19 and 20. I was then able to run this program.

17 left\_motor = EncodedMotor.get\_default\_encoded\_motor(index=1)  
18 right\_motor = EncodedMotor.get\_default\_encoded\_motor(index=2)  
19 #imu = IMU.get\_default\_imu()  
20 #drivetrain = DifferentialDrive.get\_default\_differential\_drive()  
21 rangefinder = Rangefinder.get\_default\_rangefinder()  
22 reflectance = Reflectance.get\_default\_reflectance()

Any idea why I have to comment out these two lines to get the hello world to work?

---

<div class="post-metadata">

**Author:** ![SparkFro](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/sparkfro/32/12_2.png) [@SparkFro](https://xrp.discourse.group/u/SparkFro)\
**Post date:** [November 24, 2023, 4:38pm UTC](https://xrp.discourse.group/t/error-reading-in-xrplib-defaults/155/2 "2023-11-24T16:38:46Z")

</div>

> `OSError: [Errno 110] ETIMEDOUT`

This error usually comes up if an I2C device (such as the IMU on the control board) does not respond. Since commenting out the IMU and drivetrain (which uses the IMU) resolves the error message, my guess is that the IMU on your board may be malfunctioning.

Could you please run an I2C scan to confirm whether the IMU sends an acknowledgement? If not, then your board is likely defective, and I’d suggest going through SparkFun’s support directly to resolve it (most likely RMA to get a replacement).

Hope this helps!
