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

719 views Asked by At

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

2

There are 2 answers

0
Matthijs van der Veer On BEST ANSWER

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.

0
Mohan Gopi On

The issue is with 0.14.2 version of iotedgehubdev, I tried to downgrade it with 0.14.1, but could not downgrade it. But what we did, Replaced the contents of " C:\Users***\Documents\Visual Studio 2019\iotedgehubdev\v0.14.2" with "iotedgehubdev\v0.14.1". Then it worked.

iotedgehubdev-v0.14.1

GitHub - workaround posted by chull434