Search code examples
visual-studio-2019azure-iot-hubazure-iot-edgeazure-iot-hub-device-management

Setup Iot Edge Simulator issue when we are giving iot edge connection string


We created sample iot edge application using visual studio 2019. When we are trying to setup iot edge device connection string in Setup Iot Edge Simulator getting below error.

C:\Users\10070047\Documents\Visual Studio 2019\iotedgehubdev\v0.14.2\iotedgehubdev setup -c HostName={connection string} [16472] Failed to execute script pyi_rth_pkgres Traceback (most recent call last): File "lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 11, in File "d:\a\1\s\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module File "lib\site-packages\pkg_resources_init_.py", line 86, in ModuleNotFoundError: No module named 'pkg_resources.py2_warn' [ERROR]: Failed to run 'iotedgehubdev setup -c HostName={connectionstring}' with error: [16472] Failed to execute script pyi_rth_pkgres Traceback (most recent call last): File "lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 11, in File "d:\a\1\s\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module File "lib\site-packages\pkg_resources_init_.py", line 86, in ModuleNotFoundError: No module named 'pkg_resources.py2_warn'

FYI. tried with setup the connection string enter image description here

Can someone please help me on this. Thanks


Solution

  • A few days ago an update to the Azure IoT Edge Tools for Visual Studio introduced this bug. It worked fine in 1.6, but is broken in 1.7. It has been reported on GitHub and the Microsoft Q&A forums. Both platforms usually resolve these errors quickly, so keep a look out!

    Update: A workaround was posted in lieu of an official fix.