luxonis/depthai

[BUG] Raspberry Pi OS Bookworm on Pi 5: urllib3 or chardet/charset_normalize doesn't match a supported version

slowrunner opened this issue · 1 comments

The Issue
Attempting various depthai_sdk/examples results in a fatal warning:

(vdepthai) pi@WaLiPi5:~/wali_pi5/systests/Oak-D-Lite/vdepthai/depthai/depthai_sdk/examples/PointcloudComponent $ python3 pointcloud.py 
/home/pi/wali_pi5/systests/Oak-D-Lite/vdepthai/lib/python3.11/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (5.1.0)/charset_normalizer (2.0.12) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
Closing OAK camera
Traceback (most recent call last):
  File "/home/pi/wali_pi5/systests/Oak-D-Lite/vdepthai/depthai/depthai_sdk/examples/PointcloudComponent/pointcloud.py", line 4, in <module>
    color = oak.camera('color')
            ^^^^^^^^^^
AttributeError: 'OakCamera' object has no attribute 'camera'

Installed versions are:

dpkg -l | grep urllib
ii  python3-urllib3                      1.26.12-1                           all          HTTP library with thread-safe connection pooling for Python3

dpkg -l | grep chardet
ii  libuchardet0:arm64                   0.0.7-1                             arm64        universal charset detection library - shared library
ii  python3-chardet                      5.1.0+dfsg-2                        all          Universal Character Encoding Detector (Python3)

dpkg -l | grep normalizer
ii  python3-charset-normalizer           3.0.1-2                             all          charset, encoding and language detection (Python 3)


----------------
log_system_information.py output:

python3 log_system_information.py 
{
    "architecture": "64bit ELF",
    "machine": "aarch64",
    "platform": "Linux-6.1.0-rpi7-rpi-2712-aarch64-with-glibc2.36",
    "processor": "",
    "python_build": "main Mar 13 2023 12:18:29",
    "python_compiler": "GCC 12.2.0",
    "python_implementation": "CPython",
    "python_version": "3.11.2",
    "release": "6.1.0-rpi7-rpi-2712",
    "system": "Linux",
    "version": "#1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24)",
    "win32_ver": "",
    "packages": [
        "blobconverter==1.4.2",
        "boto3==1.34.20",
        "botocore==1.34.20",
        "charset-normalizer==2.0.12",
        "depthai==2.21.2.0",
        "depthai-sdk==1.9.4",
        "distinctipy==1.3.4",
        "ffmpy3==0.2.4",
        "jmespath==1.0.1",
        "lz4==4.3.3",
        "marshmallow==3.17.0",
        "mcap==1.1.1",
        "mcap-ros1-support==0.0.8",
        "numpy==1.26.3",
        "opencv-contrib-python==4.5.5.62",
        "pip==23.3.2",
        "python-dateutil==2.8.2",
        "pytube==15.0.0",
        "PyTurboJPEG==1.6.4",
        "pyusb==1.2.1",
        "PyYAML==6.0.1",
        "Qt.py==1.3.8",
        "requests==2.26.0",
        "rosbags==0.9.11",
        "ruamel.yaml==0.18.5",
        "ruamel.yaml.clib==0.2.8",
        "s3transfer==0.10.0",
        "scipy==1.11.4",
        "sentry-sdk==1.5.1",
        "setuptools==66.1.1",
        "types-pyside2==5.15.2.1.6",
        "xmltodict==0.13.0",
        "zstandard==0.22.0"
    ],
    "usb": [
        {
            "port": 0,
            "vendor_id": "0x1d6b",
            "product_id": "0x0003",
            "speed": "Super"
        },
        {
            "port": 2,
            "vendor_id": "0x4c4a",
            "product_id": "0x4155",
            "speed": "Full"
        },
        {
            "port": 1,
            "vendor_id": "0x03e7",
            "product_id": "0x2485",
            "speed": "High"
        },
        {
            "port": 0,
            "vendor_id": "0x1d6b",
            "product_id": "0x0002",
            "speed": "High"
        },
        {
            "port": 0,
            "vendor_id": "0x1d6b",
            "product_id": "0x0003",
            "speed": "Super"
        },
        {
            "port": 2,
            "vendor_id": "0x046d",
            "product_id": "0xc21f",
            "speed": "Full"
        },
        {
            "port": 0,
            "vendor_id": "0x1d6b",
            "product_id": "0x0002",
            "speed": "High"
        }
    ],
    "uname": [
        "Linux WaLiPi5 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64"
    ]
}


Minimal Reproducible Example
(vdepthai) pi@WaLiPi5:~/wali_pi5/systests/Oak-D-Lite/vdepthai/depthai/depthai_sdk/examples/PointcloudComponent $ more mre.py
from depthai_sdk import OakCamera

with OakCamera() as oak:
color = oak.camera('color')

(vdepthai) pi@WaLiPi5:~/wali_pi5/systests/Oak-D-Lite/vdepthai/depthai/depthai_sdk/examples/PointcloudComponent $ python3 mre.py
/home/pi/wali_pi5/systests/Oak-D-Lite/vdepthai/lib/python3.11/site-packages/requests/init.py:102: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (5.1.0)/charset_normalizer (2.0.12) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
Closing OAK camera
Traceback (most recent call last):
File "/home/pi/wali_pi5/systests/Oak-D-Lite/vdepthai/depthai/depthai_sdk/examples/PointcloudComponent/mre.py", line 4, in
color = oak.camera('color')
^^^^^^^^^^
AttributeError: 'OakCamera' object has no attribute 'camera'

Expected behavior
execute with no warning/error

Attach system log

Additional context

(Do not see the warning on Ubuntu 22.04 but same OakCamera object has no attribute 'camera' error does occur - separate issue it appears.)

Hi @slowrunner
I think the syntax was oak.create_camera() which was changed to oak.camera() in 1.12 (not sure). So, to fix this, update the SDK to a newer version.