Azure / iotedgehubdev

IoT Edge Hub Dev Tool
Other
87 stars 30 forks source link

[0.14.2] ModuleNotFoundError: No module named 'pkg_resources.py2_warn' [19044] Failed to execute script pyi_rth_pkgres #288

Closed chull434 closed 3 years ago

chull434 commented 3 years ago

Hi,

Was working all fine yesterday but today when I went to start debugging vs code said this package was updating and now it throws this python error of missing a package, please advise, thanks

(base) PS C:\dev--project-name--> & "c:\Users--user-name--.vscode\extensions\vsciot-vscode.azure-iot-edge-1.23.0\iotedgehubdev\0.14.2\iotedgehubdev" setup -c "--connection-string--" 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' [19044] Failed to execute script pyi_rth_pkgres (base) PS C:\dev--project-name-->

JorTurFer commented 3 years ago

I have the same issue here

longday24 commented 3 years ago

Same issue executing any argument (start, stop...) on iotedgehubdev. I have uninstalled all traces of python, reinstalled azure iot edge tools.

iotedgehubdev installed with pip install --upgrade iotedgehubdev works fine. VS extention uses a precompiled iotedgehubdev loaded into documents/visual studio 2019/iotedgehubdev.

[9904] 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 stop' with error: [9904] 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'

If I could determine how to set the path/iotedgehubdev the extension used I could be unblocked.

chull434 commented 3 years ago

If I could determine how to set the path/iotedgehubdev the extension used I could be unblocked.

Same I tried hacking around seeing if I could find where to set it back to previous version (0.14.1) as I am fairly sure it was all working fine yesterday but couldn't fine anything. Even tried deleting 0.14.2 and manually downloading previous version in instead but it force updates and downloads 0.14.2 again

chull434 commented 3 years ago

ok missive hack but I got it to work for me again and am unblocked 😄

This proves issue is somewhere in v0.14.2, must be the curse of push a release last thing on a Friday lol

fbeltrao commented 3 years ago

I am having the same issue as described here. Was working last week. Currently cannot debug IoT Edge application from Visual Studio 2019.

lakshmisivareddy commented 3 years ago

I am having the same issue

AnlauTriCloud commented 3 years ago

Same issue here as well

marxxxx commented 3 years ago

Same here since updating VS to 16.7.6. Can also be reproduced with a brand-new empty Azure IoT Edge project.

AnlauTriCloud commented 3 years ago

Downgrading iotedgehubdev to v0.14.1, simply by replacing the files, also seemed to fix the problem for me.

nouira commented 3 years ago

Same problem here too. Downgrading works for me.

JAgostoni commented 3 years ago

Argh. And VS 2019 auto-upgrades on me.

JAgostoni commented 3 years ago

FYI, just working from the command line directly for now. Used PIP to install an older version: pip uninstall iotedgehubdev pip install 'iotedgehubdev<=0.14.1'

uriel-kluk commented 3 years ago

Using VS2019 I tried downgrading but I still have the same issue.

[ERROR]: [9884] 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'

dvescovi1 commented 3 years ago

same issue here. Stopped me in my tracks.

dvescovi1 commented 3 years ago

somebody needs to fix this and fix it fast.

amogh79 commented 3 years ago

I am still getting version 0.14.2 from Visual Studio 2019->Tools->Azure IoT Edge Tools->Update IoT Edge Simulator. How do I force pull the latest version 0.14.3rc0 from Visual Studio 2019? Please assist.

amogh79 commented 3 years ago

@marianan I upgraded setup tools to latest version 50.3.2 but when I am still getting version 0.14.2.

uriel-kluk commented 3 years ago

@marianan Release v0.14.3 is now posted on this GitHub repo, but the update tools are not able to grab it. Please see the traces when trying to grab a particular distribution.

How can I install using the zip file?

C:\Users\UrielKluk>pip install --upgrade iotedgehubdev==0.14.3
ERROR: Could not find a version that satisfies the requirement iotedgehubdev==0.14.3 (from versions: 0.1.0, 0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.10.0, 0.11.0, 0.11.1, 0.14.0, 0.14.1, 0.14.2)
ERROR: No matching distribution found for iotedgehubdev==0.14.3

C:\Users\UrielKluk>
marianan commented 3 years ago

The iotedgehubdev release 0.14.3 is fully deployed and resolves the original issue. Please updated the thread if the original symptoms are still present after installing 0.14.3.

uriel-kluk commented 3 years ago

@marianan it now installs 0.14.3 but when I try to run I still get the same original problem. How can I help you to replicate? Do you need source?

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]: [19308] 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'

dvescovi1 commented 3 years ago

everything working for me now @marianan thank you!

uriel-kluk commented 3 years ago

I did an update using the VS2019 > Tools > Azure IoT Edge Tools > Update IoT Edge Simulator I get the message: Download and install...

but if I look in [my user]\documents\Visual Studio 2019\iotedgehubdev I only see 0.14.2

Then trying to Build and Run IoT Edge Modules in Simulator I got: C:\Users\UrielKluk\Documents\Visual Studio 2019\iotedgehubdev**v0.14.2**\iotedgehubdev start -d "C:_Src\TXS.Edge.AccessControl\TXS.EdgeAccCtrl\config\deployment.amd64.json" -v

Workaround for VS2019

Download the latest release v0.14.3 from this repo

Create the folder v0.14.3 inside C:\Users\[my user]\documents\Visual Studio 2019\iotedgehubdev Copy the content of the downloaded zip file inside this folder

Open the file: C:\Users[my user]\Documents\Visual Studio 2019\iotedgehubdev\simulator.config

Replace the version to: {"Version":"v0.14.3"}

It is safe to delete the folder v0.14.2 from your user folder.

konichi3 commented 3 years ago

The root cause was resolved in version 0.14.3 of iotedgehubdev If you are still experiencing the same symptoms, please update this thread.

konichi3 commented 3 years ago

Closing. Pls let us know if this issue still persist