View: 40|Reply: 2

OSError: [Errno 121] Remote I/O error when run webServer.py

[Copy link]

1

Threads

2

Posts

11

Credits

Newbie

Rank: 1

Credits
11
Post time 2022-12-27 05:06:22 | Show all posts |Read mode
Hi there,

        I followed the instructions step by step to build the RaspTank and when I try to test if the webServer.py works I got the following error message:

pi@rasptank:~ $ sudo python3 adeept_rasptank/server/webServer.py
Traceback (most recent call last):
  File "adeept_rasptank/server/webServer.py", line 14, in <module>
    import RPIservo
  File "/home/pi/adeept_rasptank/server/RPIservo.py", line 17, in <module>
    pwm = Adafruit_PCA9685.PCA9685()
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PCA9685/PCA9685.py", line 75, in __init__
    self.set_all_pwm(0, 0)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PCA9685/PCA9685.py", line 111, in set_all_pwm
    self._device.write8(ALL_LED_ON_L, on & 0xFF)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/I2C.py", line 114, in write8
    self._bus.write_byte_data(self._address, register, value)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 327, in write_byte_data
    self._device.write(data)
OSError: [Errno 121] Remote I/O error


I reed your Q&A and I check this:
        Run "webServer.py" error: remote I/O error. It may be because i2c is not turned on.
        Enter in the Raspberry Pi:
        sudo raspi-config
        Select "3 Interface options" Select "P5 I2C"
        Select "Yes" to open i2c

And I check it and it’s ok and enabled.

But I'm sure that the camera works because I can take a photo with this command:
        raspistill -o test.jpg

And also I can execute a video stream on my Chrome Browser with the applications inside the flask-video-streaming folder:
        app.py

So, I’m really don’t know what could be the problem about the webServer.py
I hope that you can help me.

Thanks

Reply

Use magic Report

1

Threads

2

Posts

11

Credits

Newbie

Rank: 1

Credits
11
 Author| Post time 2022-12-27 05:30:46 | Show all posts
Solved.
I didn't understand that plus the camera, the motor hat also had to be installed.
Reply

Use magic Report

0

Threads

28

Posts

81

Credits

Administrator

Rank: 9Rank: 9Rank: 9

Credits
81
Post time 2023-1-10 16:13:20 | Show all posts
1. Please confirm whether the HAT is installed correctly.
2. Enter in the Raspberry Pi command line: i2cdetect -y 1
Normally, the running results will show that addresses "40" and "70" are occupied. This is because the HAT needs to occupy "40" and "70" in the I2C address. If the corresponding I2C address ("40", "70") is not detected in the program, an error will be reported.
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules