Search code examples
azureazure-devopsazure-iot-edge

"RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!" in Azure DevOps - Azure IoT Edge Task - build


One of my deployment pipelines on Azure DevOps fails when executing the build module images action of Azure IoT Edge task. I am trying to deploy a custom module developed using the Azure IoT SDK for C# (.NET 6).

Error message:

##[error]/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!

I tried to include this solution as CmdLine task before the build task. It worked a few runs and then failed again.

The pipeline already had a "Temporary fix" installing iotedgedev separately as a workaround for this bug

The deployment logs don't tell much about where to focus. I wonder what could be the cause of this issue? and if there is a quick fix or something to avoid while developing the application (i.e. warning messages while building or something like that)


Solution

  • Short answer -> force pyOpenSSL to version 22.0.0 (Edited 09.01.20223)

    pip install -U iotedgedev pyOpenSSL==22.0.0 urllib3 requests

    The cause seems to be a reported bug related to a dependency issue connected to a new pyOpenSSL release: github.com/Azure/iotedgedev/issues/589

    pyOpenSSL>=20.0.1 on iotedgedev requirements resolves pyOpenSSL-22.1.0 creating some conflict with urlib or chardet

    In this case, a temporary fix needed a "quick" temporary fix :D