Visual studio Code (Code-Oss): TypeError: an integer is required(got type bytearray)

Hello everyone
I have this type of error: an integer is required (got type bytearray) when running the code:
from adafruit_servokit import Servokit
myKit= ServoKit(channels=16)
myKit.servo[0].angle=90

the error message:
dlinano@jetson-nano:~/Desktop/pyPro$ /usr/bin/python3 /home/dlinano/Desktop/pyPro/openCV19-simpleservo.py
Traceback (most recent call last):
File “/home/dlinano/Desktop/pyPro/openCV19-simpleservo.py”, line 2, in
myKit=ServoKit(channels=16)
File “/usr/local/lib/python3.6/dist-packages/adafruit_servokit.py”, line 92, in init
self._pca.frequency = 50
File “/usr/local/lib/python3.6/dist-packages/adafruit_pca9685.py”, line 158, in frequency
old_mode = self.mode1_reg # Mode 1
File “/usr/local/lib/python3.6/dist-packages/adafruit_register/i2c_struct.py”, line 87, in get
i2c.write_then_readinto(buf, buf, out_end=1, in_start=1)
File “/usr/local/lib/python3.6/dist-packages/adafruit_bus_device/i2c_device.py”, line 156, in write_then_readinto
in_end=in_end,
File “/usr/local/lib/python3.6/dist-packages/busio.py”, line 92, in writeto_then_readfrom
in_start=in_start, in_end=in_end, stop=stop)
File “/usr/local/lib/python3.6/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 61, in writeto_then_readfrom
readin = self._i2c_bus.read_i2c_block_data(address, buffer_out[out_start:out_end], in_end-in_start)
File “/usr/local/lib/python3.6/dist-packages/Adafruit_PureIO-0.2.3-py3.6.egg/Adafruit_PureIO/smbus.py”, line 207, in read_i2c_block_data
TypeError: an integer is required (got type bytearray)
Exiting…
Cleaning up pins

Here is picture:


P/s: I run in python 3.6.9 64-bit
Do anyone have a solution to fix this error please help me

Hi,

Thanks for your question.

It looks like you are using a custom app.
Could you share a simple reproducible source with us debugging?

Thanks.

Thanks for your reply
Yeah, I am using Visual Studio Code (Code Oss) to debug and the source code that I use that come youtube channels you can check the link below:
[AI on the Jetson Nano LESSON 31: Controlling Servos with the Jetson Nano using the PCA9685 - YouTube] (it at 35:23 you will see the source code)
Probably, I think the python version 3.6.9 64bit it not compatible with the source code.

Hi,

Sorry for the late.

It looks like you are facing the similar issue as this topic:

https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/issues/48

Please check the suggestion and comment to see if helps.
Thanks.