当我们提供物联网边缘连接字符串时设置物联网边缘模拟器问题

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

我们使用 visual studio 2019 创建了示例物联网边缘应用程序。当我们尝试在设置物联网边缘模拟器中设置物联网边缘设备连接字符串时出现以下错误。

C:\Users070047\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\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\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'

仅供参考。尝试设置连接字符串

有人可以帮我解决这个问题吗? 谢谢

几天前 Visual Studio 的 Azure IoT Edge 工具更新引入了这个错误。它在 1.6 中运行良好,但在 1.7 中被破坏。 GitHub and the Microsoft Q&A forums 上有报道。这两个平台通常都能很快解决这些错误,所以请留意!

更新:A workaround 已发布以代替官方修复。

问题出在0.14.2版本的iotedgehubdev上,我尝试用0.14.1降级,但无法降级。但是我们所做的,将“C:\Users***\Documents\Visual Studio 2019\iotedgehubdev\v0.14.2”的内容替换为“iotedgehubdev\v0.14.1”。然后就成功了。

iotedgehubdev-v0.14.1

GitHub - workaround posted by chull434