espressif / idf-installer

ESP IDF Windows Installer
https://dl.espressif.com/dl/esp-idf/
101 stars 21 forks source link

Error during esp-idf-tools-setup-offline-4.4.exe on Windows 10 installation (IDFGH-6969) #128

Closed mesmariusz closed 2 years ago

mesmariusz commented 2 years ago

During installation:

esp-idf-tools-setup-offline-4.4.exe

on Windows 10, the installation has been stopped / exited because of:

idf_tools.py: error: argument action: invalid choice: 'Files\Espressif\frameworks\esp-idf-v4.4\' (choose from 'list', 'check', 'export', 'install', 'download', 'install-python-env')

Any idea to solve / preform valid installation ?

End of the installation log file:

2022-03-16 10:49:00.660 Running command: C:\Program Files\Espressif\tools\idf-python\3.8.7\python.exe "C:\Program Files\Espressif\frameworks\esp-idf-v4.4\tools\idf_tools.py" --idf-path C:\Program Files\Espressif\frameworks\esp-idf-v4.4\ install --targets=esp32,esp32-c3,esp32-s3,esp32-s2 usage: idf_tools.py [-h] [--quiet] [--non-interactive] [--tools-json TOOLS_JSON] [--idf-path IDF_PATH] {list,check,export,install,download,install-python-env} ... idf_tools.py: error: argument action: invalid choice: 'Files\Espressif\frameworks\esp-idf-v4.4\' (choose from 'list', 'check', 'export', 'install', 'download', 'install-python-env')

2022-03-16 10:49:00.660 -------- 2022-03-16 10:49:00.660 Message box (OK): Installation has failed with exit code 2 2022-03-16 10:49:03.705 User chose OK. 2022-03-16 10:49:03.719 Message box (Yes/No): Installation log has been created, it may contain more information about the problem. Display the installation log now? 2022-03-16 10:49:12.812 User chose Yes. 2022-03-16 10:49:12.884 CurStepChanged raised an exception. 2022-03-16 10:49:13.025 Need to restart Windows? No 2022-03-16 10:49:13.047 -- Run entry -- 2022-03-16 10:49:13.047 Run as: Original user 2022-03-16 10:49:13.047 Type: ShellExec 2022-03-16 10:49:13.047 Filename:

https://i.imgur.com/wuVw18u.png

mesmariusz commented 2 years ago

I found the reason. During installation I changed the default installation patch from c:\Espressif to c:\program files\Espressif. It made an empty (white) space between program and files and result as described below.

Finally I reinstalled but use c:\Espressif and the installation has been done succesfully.

But anyway it looks like some kind of mistake (at list installer shouldn't make it possible to use a patch including empty spaces...)

georgik commented 2 years ago

@mesmariusz Thank you for reporting the problem. Installer should validate path for special character or spaces. I'll double check situation with Program Files.

georgik commented 2 years ago

Confirmed: Select Destination dialog does not have validation for whitespaces. The validation is only in IDF-tools dialog

georgik commented 2 years ago

Test with Online installer: The problem occurs only when shell is activated via CMD link. Activation from PowerShell link from Desktop works without problem.

Offline installer does not have the check in IDF-tools dialog

georgik commented 2 years ago

Added check for whitespace in Tools path. The correction is available in: https://github.com/espressif/idf-installer/releases/tag/online-2.14-beta-04

@mesmariusz Please test the configuration part of the installer. The installer should display error page when path with spaces is selected in Destination page and user clicks Next.

The correction for Offline installer will be available for the next version with ESP-IDF v4.4.1.