Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report]: ESP-IDF does not work with user dirs with space in name (VSC-929) #751

Closed
3 tasks
Smashcat opened this issue Jul 3, 2022 · 2 comments · Fixed by #761
Closed
3 tasks

[Bug Report]: ESP-IDF does not work with user dirs with space in name (VSC-929) #751

Smashcat opened this issue Jul 3, 2022 · 2 comments · Fixed by #761
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) duplicate This issue or pull request already exists stale Stale PR or Issue

Comments

@Smashcat
Copy link

Smashcat commented Jul 3, 2022

Pre Bug Report Checklist
Before reporting any bug please make sure of these points.

  • Make sure you have searched for existing bugs and features request before you post an issue.
  • This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
  • I've read the docs and found no information that could have helped solving the issue.

Describe the bug
After install of all components using VS Studio Code, and adding all dependencies, projects cannot compile, cannot select serial port, or monitor etc as all commands crash out as they do not escape spaces in directories.

To Reproduce
Install as normal, with user that has a space in directory name (Windows 10).

Expected behavior
Expected examples to compile, able to select port etc.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Windows 10
  • VSCode Version: 1.68.1
  • ESP-IDF Version: unknown - latest installed today
  • Python Version: 3.8

NOTE: You can use the ESP-IDF: Doctor command to generate a report of your configuration in your clipboard which you can copy here.

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.19043
System environment variable IDF_PYTHON_ENV_PATH
undefined
System environment variable PATH
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python310\Scripts;C:\Python310;C:\Program Files\Oculus\Support\oculus-runtime;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Microchip\xc8\v2.31\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\PuTTY;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Users\Scott Porter\AppData\Local\Microsoft\WindowsApps;;C:\Users\Scott Porter\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Scott Porter\AppData\Roaming\npm
System environment variable PYTHON
undefined
Visual Studio Code version 1.68.1
Visual Studio Code language en
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.4.0
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:\Users\Scott Porter\esp\esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
Custom extra paths (idf.customExtraPaths) C:\Users\Scott Porter.espressif\tools\xtensa-esp32-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin;C:\Users\Scott Porter.espressif\tools\xtensa-esp32s2-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s2-elf\bin;C:\Users\Scott Porter.espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\bin;C:\Users\Scott Porter.espressif\tools\riscv32-esp-elf\esp-2021r2-patch3-8.4.0\riscv32-esp-elf\bin;C:\Users\Scott Porter.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:\Users\Scott Porter.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;C:\Users\Scott Porter.espressif\tools\cmake\3.20.3\bin;C:\Users\Scott Porter.espressif\tools\openocd-esp32\v0.11.0-esp32-20211220\openocd-esp32\bin;C:\Users\Scott Porter.espressif\tools\ninja\1.10.2;C:\Users\Scott Porter.espressif\tools\idf-exe\1.0.3;C:\Users\Scott Porter.espressif\tools\ccache\4.3\ccache-4.3-windows-64;C:\Users\Scott Porter.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64
Custom extra vars (idf.customExtraVars) {"OPENOCD_SCRIPTS":"C:\Users\Scott Porter\.espressif\tools\openocd-esp32\v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts","IDF_CCACHE_ENABLE":"1"}
Virtual env Python Path (idf.pythonBinPath) C:\Users\Scott Porter.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe
Serial port (idf.port) COM1
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,board/esp32-wrover.cfg
ESP-IDF Tools Path (idf.toolsPath) C:\Users\Scott Porter.espressif
Git Path (idf.gitPath) C:\Users\Scott Porter.espressif\tools\idf-git\2.30.1\cmd\git.exe
-------------------------------------------------------- Configurations access -------------------------------------------------------------
Access to ESP-ADF Path (idf.espAdfPath) false
Access to ESP-IDF Path (idf.espIdfPath) true
Access to ESP-MDF Path (idf.espMdfPath) false
Access to ESP-IDF Custom extra paths
Access to C:\Users\Scott Porter.espressif\tools\xtensa-esp32-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin: true
Access to C:\Users\Scott Porter.espressif\tools\xtensa-esp32s2-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s2-elf\bin: true
Access to C:\Users\Scott Porter.espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\bin: true
Access to C:\Users\Scott Porter.espressif\tools\riscv32-esp-elf\esp-2021r2-patch3-8.4.0\riscv32-esp-elf\bin: true
Access to C:\Users\Scott Porter.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin: true
Access to C:\Users\Scott Porter.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin: true
Access to C:\Users\Scott Porter.espressif\tools\cmake\3.20.3\bin: true
Access to C:\Users\Scott Porter.espressif\tools\openocd-esp32\v0.11.0-esp32-20211220\openocd-esp32\bin: true
Access to C:\Users\Scott Porter.espressif\tools\ninja\1.10.2: true
Access to C:\Users\Scott Porter.espressif\tools\idf-exe\1.0.3: true
Access to C:\Users\Scott Porter.espressif\tools\ccache\4.3\ccache-4.3-windows-64: true
Access to C:\Users\Scott Porter.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH undefined
Access to Ninja in environment PATH undefined
Access to ESP-IDF Tools Path (idf.toolsPath) true
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.30.1.windows.1
ESP-IDF version 4.4.1
Python version 3.8.7
Python's pip version 20.3.3
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages undefined
---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------
Check Extension Python packages undefined
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages undefined
----------------------------------------------------------- Latest error -----------------------------------------------------------------
Latest error at Command failed: C:\Users\Scott Porter.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe -m pip list --format json
'C:\Users\Scott' is not recognized as an internal or external command,
operable program or batch file.


In Visual Studio Code select menu View -> Output -> ESP-IDF, ESP-IDF Debug Adapter, Heap Trace, OpenOCD and SDK Configuration Editor. (doesn't work)

NOTE: Use idf.openOcdDebugLevel configuration setting to 3 or more to show debug logging in OpenOCD server output. (doesn't work)

NOTE: Use logLevel in your /.vscode/launch.json to 3 or more to show more debug adapter output.

Please share the output of the channel related to your issue. For example ESP-IDF is used mostly for the extension setup process output.

Logs
Please share the log file which can be obtained from:

PS Z:\esp-idf\hello_world\hello_world> C:\Users\Scott Porter.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:\Users\Scott Porter\esp\esp-idf\tools\idf.py -p COM1 monitor
C:\Users\Scott : The term 'C:\Users\Scott' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1

  • C:\Users\Scott Porter.espressif\python_env\idf4.4_py3.8_env\Scripts\ ...
  •   + CategoryInfo          : ObjectNotFound: (C:\Users\Scott:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS Z:\esp-idf\hello_world\hello_world>

Extension Configuration settings
Open Command Palette (F1 or View Menu -> Command Palette) and type Preferences: Open Settings (JSON) or use {CURRENT_PROJECT}/.vscode/settings.json to get the following extension configuration settings value:

  • idf.espIdfPath (MacOS or Linux) or idf.espIdfPathWin (Windows) also called Path to locate ESP-IDF framework (IDF_PATH) in Preferences: Open Settings (UI).
  • idf.pythonBinPath (MacOS or Linux) or idf.pythonBinPathWin (Windows) also called Python absolute binary path used to execute ESP-IDF Python Scripts in Preferences: Open Settings (UI).
  • idf.openOcdConfigs also called List of configuration files inside OpenOCD Scripts directory in Preferences: Open Settings (UI).
  • idf.customExtraPaths also called Paths to be appended to PATH in Preferences: Open Settings (UI).
  • idf.customExtraVars also called Variables to be added to system environment variables in Preferences: Open Settings (UI).
  • idf.adapterTargetName also called Target name for ESP-IDF Debug Adapter in Preferences: Open Settings (UI).
  • idf.customAdapterTargetName is used when idf.adapterTargetName is set to custom.

Additional context
Add any other context about the problem here.

@Smashcat Smashcat added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Jul 3, 2022
@github-actions github-actions bot changed the title [Bug Report]: ESP-IDF does not work with user dirs with space in name [Bug Report]: ESP-IDF does not work with user dirs with space in name (VSC-929) Jul 3, 2022
@brianignacio5 brianignacio5 added the duplicate This issue or pull request already exists label Jul 4, 2022
@brianignacio5
Copy link
Collaborator

This is a duplicate of #742

The ESP-IDF build system doesn't support spaces in PATH and tools yet. We have yet to implement and validate all tools to avoid spaces.

@github-actions
Copy link

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) duplicate This issue or pull request already exists stale Stale PR or Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants