-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
When I try to run the code in my Jupyter notebook, I get this error. How can I fix it?
OSError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/adafruit_circuitpython_busdevice-5.0.6-py3.6.egg/adafruit_bus_device/i2c_device.py in __probe_for_device(self)
153 try:
--> 154 self.i2c.writeto(self.device_address, b"")
155 except OSError:
/usr/local/lib/python3.6/dist-packages/Adafruit_Blinka-6.10.0-py3.6.egg/busio.py in writeto(self, address, buffer, start, end, stop)
157 return self._i2c.writeto(address, memoryview(buffer)[start:end], stop=stop)
--> 158 return self._i2c.writeto(address, buffer, stop=stop)
159
/usr/local/lib/python3.6/dist-packages/Adafruit_Blinka-6.10.0-py3.6.egg/adafruit_blinka/microcontroller/generic_linux/i2c.py in writeto(self, address, buffer, start, end, stop)
48 end = len(buffer)
---> 49 self._i2c_bus.write_bytes(address, buffer[start:end])
50
/usr/local/lib/python3.6/dist-packages/Adafruit_PureIO-1.1.8-py3.6.egg/Adafruit_PureIO/smbus.py in write_bytes(self, addr, buf)
307 self._select_device(addr)
--> 308 self._device.write(buf)
309
OSError: [Errno 121] Remote I/O error
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/adafruit_circuitpython_busdevice-5.0.6-py3.6.egg/adafruit_bus_device/i2c_device.py in __probe_for_device(self)
159 result = bytearray(1)
--> 160 self.i2c.readfrom_into(self.device_address, result)
161 except OSError:
/usr/local/lib/python3.6/dist-packages/Adafruit_Blinka-6.10.0-py3.6.egg/busio.py in readfrom_into(self, address, buffer, start, end)
147 stop = True # remove for efficiency later
--> 148 return self._i2c.readfrom_into(address, buffer, stop=stop)
149
/usr/local/lib/python3.6/dist-packages/Adafruit_Blinka-6.10.0-py3.6.egg/adafruit_blinka/microcontroller/generic_linux/i2c.py in readfrom_into(self, address, buffer, start, end, stop)
55
---> 56 readin = self._i2c_bus.read_bytes(address, end - start)
57 for i in range(end - start):
/usr/local/lib/python3.6/dist-packages/Adafruit_PureIO-1.1.8-py3.6.egg/Adafruit_PureIO/smbus.py in read_bytes(self, addr, number)
178 self._select_device(addr)
--> 179 return self._device.read(number)
180
OSError: [Errno 121] Remote I/O error
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
in
1 from jetracer.nvidia_racecar import NvidiaRacecar
2
----> 3 car = NvidiaRacecar()
~/jetracer/jetracer/nvidia_racecar.py in init(self, *args, **kwargs)
15 def init(self, *args, **kwargs):
16 super(NvidiaRacecar, self).init(*args, **kwargs)
---> 17 self.kit = ServoKit(channels=16, address=self.i2c_address)
18 self.steering_motor = self.kit.continuous_servo[self.steering_channel]
19 self.throttle_motor = self.kit.continuous_servo[self.throttle_channel]
/usr/local/lib/python3.6/dist-packages/adafruit_circuitpython_servokit-1.3.4-py3.6.egg/adafruit_servokit.py in init(self, channels, i2c, address, reference_clock_speed, frequency)
79 i2c = board.I2C()
80 self._pca = PCA9685(
---> 81 i2c, address=address, reference_clock_speed=reference_clock_speed
82 )
83 self._pca.frequency = frequency
/usr/local/lib/python3.6/dist-packages/adafruit_circuitpython_pca9685-3.3.6-py3.6.egg/adafruit_pca9685.py in init(self, i2c_bus, address, reference_clock_speed)
118
119 def init(self, i2c_bus, *, address=0x40, reference_clock_speed=25000000):
--> 120 self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)
121 self.channels = PCAChannels(self)
122 """Sequence of 16 PWMChannel objects. One for each channel."""
/usr/local/lib/python3.6/dist-packages/adafruit_circuitpython_busdevice-5.0.6-py3.6.egg/adafruit_bus_device/i2c_device.py in init(self, i2c, device_address, probe)
48
49 if probe:
---> 50 self.__probe_for_device()
51
52 def readinto(self, buf, *, start=0, end=None):
/usr/local/lib/python3.6/dist-packages/adafruit_circuitpython_busdevice-5.0.6-py3.6.egg/adafruit_bus_device/i2c_device.py in __probe_for_device(self)
161 except OSError:
162 # pylint: disable=raise-missing-from
--> 163 raise ValueError("No I2C device at address: 0x%x" % self.device_address)
164 # pylint: enable=raise-missing-from
165 finally:
ValueError: No I2C device at address: 0x40