Trying to debug in visual studio code extension: No module named 'win32api'

ihouses
Posts: 19
Joined: Sun Jul 09, 2017 1:41 pm

Trying to debug in visual studio code extension: No module named 'win32api'

Postby ihouses » Wed Dec 30, 2020 10:14 pm

Hi,

I am using the Visual studio code extension for ESP32 and I have connected the JTAG to my board, when I push F5 I get:

Code: Select all

Traceback (most recent call last):
  File "c:\Users\Jose\.vscode\extensions\espressif.esp-idf-extension-0.5.1\esp_debug_adapter\debug_adapter_main.py", line 26, in <module>
    from debug_adapter import cli
  File "c:\Users\Jose\.vscode\extensions\espressif.esp-idf-extension-0.5.1\esp_debug_adapter\debug_adapter\__init__.py", line 25, in <module>
    from .debug_adapter import DebugAdapter, A2VSC_READY2CONNECT_STRING, A2VSC_STOPPED_STRING, A2VSC_STARTED_STRING
  File "c:\Users\Jose\.vscode\extensions\espressif.esp-idf-extension-0.5.1\esp_debug_adapter\debug_adapter\debug_adapter.py", line 40, in <module>
    from .command_processor import CommandProcessor
  File "c:\Users\Jose\.vscode\extensions\espressif.esp-idf-extension-0.5.1\esp_debug_adapter\debug_adapter\command_processor.py", line 14, in <module>
    from .tools import get_good_path, Measurement
  File "c:\Users\Jose\.vscode\extensions\espressif.esp-idf-extension-0.5.1\esp_debug_adapter\debug_adapter\tools.py", line 36, in <module>
    import win32api
ModuleNotFoundError: No module named 'win32api'
[Stopped] : ESP-IDF Debug Adapte
r


I have installed the win32api with this: pip install pypiwin32 but doesn't change anything.
I am using Windows and python 3.9 plus the last version (0.5.1) of the visual studio extension.

Does anyone has the same problem?

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: Trying to debug in visual studio code extension: No module named 'win32api'

Postby ESP_bignacio » Thu Jan 07, 2021 3:09 am

You need to install win32api in your virtual environment python packages.
If you just do `pip install win32api` it will install in your global python packages. Try `idf.pythonBinPathWin -m pip install win32api` and replace idf.pythonBinPathWin with the python path in your extension settings.

Who is online

Users browsing this forum: No registered users and 24 guests