当我们提供物联网边缘连接字符串

问题描述

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

C:\ Users \ 10070047 \ Documents \ Visual Studio 2019 \ iotedgehubdev \ v0.14.2 \ iotedgehubdev setup -c HostName = {连接字符串} [16472]无法执行脚本pyi_rth_pkgres 追溯(最近一次通话): 第11行中的文件“ lib \ site-packages \ PyInstaller \ loader \ rthooks \ pyi_rth_pkgres.py” 文件``d:\ a \ 1 \ s \ venv \ lib \ site-packages \ PyInstaller \ loader \ pyimod03_importers.py'',627行,在exec_module中 在第86行中输入文件“ lib \ site-packages \ pkg_resources_ init _。py” ModuleNotFoundError:没有名为“ pkg_resources.py2_warn”的模块 [错误]:无法运行'iotedgehubdev安装程序-c HostName = {connectionstring}',错误:[16472]无法执行脚本pyi_rth_pkgres 追溯(最近一次通话): 第11行中的文件“ lib \ site-packages \ PyInstaller \ loader \ rthooks \ pyi_rth_pkgres.py” 文件``d:\ a \ 1 \ s \ venv \ lib \ site-packages \ PyInstaller \ loader \ pyimod03_importers.py'',627行,在exec_module中 在第86行中输入文件“ lib \ site-packages \ pkg_resources_ init _。py” ModuleNotFoundError:没有名为“ pkg_resources.py2_warn”的模块

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

enter image description here

有人可以帮我吗? 谢谢

解决方法

几天前,针对Visual Studio的Azure IoT Edge工具的更新引入了此错误。它在1.6中工作正常,但在1.7中被破坏。 已在GitHub和Microsoft Q&A forums上进行了报道。两种平台通常都能快速解决这些错误,因此请当心!

更新:发布了A workaround来代替官方修正。

,

问题出在iotedgehubdev的0.14.2版本上,我试图用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

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...