ESP-IDF export.sh doesnt work: python -m json.tool argument error
Posted: Sat Jul 02, 2022 6:14 pm
Hey ESP-Community,
I'm trying to install the ESP-IDF with this tutorial: https://docs.espressif.com/projects/esp ... irst-steps.
Then I want to use VS Code with the espressif-extensions to program my applications.
My OS: macOS Monterey on a 2018 i5 Macbook Pro
With Tools:
- ZSH 5.8.1 (x86_64-apple-darwin21.0)
- Python 3.10.0
- Brew 3.5.3 with cmake, ninja, dfu-util, ccache, python
- esptool.py v3.2 (already used successfully with the Arduino IDE)
But as I'm running this command:
[Codebox]. $HOME/esp/esp-idf/export.sh
[/Codebox]
I get a veryyy long & bulky output - here is a snippet:
[Codebox]
Detecting the Python interpreter
Checking "python3" ...
Python 3.10.0
"python3" has been detected
Checking Python compatibility
Checking other ESP-IDF version.
usage: python -m json.tool [-h]
[--sort-keys]
[--no-ensure-ascii]
[--json-lines]
[--indent INDENT | --tab | --no-indent | --compact]
[infile]
[outfile]
python -m json.tool: error: argument infile: can't open '': [Errno 2] No such file or directory: ''
Adding ESP-IDF tools to PATH...
usage: python -m json.tool [-h]
[--sort-keys]
[--no-ensure-ascii]
[--json-lines]
[--indent INDENT | --tab | --no-indent | --compact]
[infile]
[outfile]
python -m json.tool: error: argument infile: can't open 'export OPENOCD_SCRIPTS="/Users/carl/.espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/share/openocd/scripts";export IDF_PYTHON_ENV_PATH="/Users/carl/.espressif/python_env/idf5.0_py3.10_env";export ESP_IDF_VERSION="5.0";export PATH="/Users/carl/.espressif/tools/xtensa-esp-elf-gdb/11.2_20220529/xtensa-esp-elf-gdb/bin:/Users/carl/.espressif/tools/riscv32-esp-elf-gdb...
[/Codebox]
And at the end:
[Codebox]
...rl/opt/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:
idf.py build
env: idf.py: No such file or directory
usage: python -m json.tool [-h]
[--sort-keys]
[--no-ensure-ascii]
[--json-lines]
[--indent INDENT | --tab | --no-indent | --compact]
[infile]
[outfile]
python -m json.tool: error: argument infile: can't open '': [Errno 2] No such file or directory: ''
WARNING: Failed to load shell autocompletion for zsh version: 5.8.1!
[/Codebox]
Can you help me? Hopefully, I posted this problem in the right category...
Thanks in advance
NEOZEO
I'm trying to install the ESP-IDF with this tutorial: https://docs.espressif.com/projects/esp ... irst-steps.
Then I want to use VS Code with the espressif-extensions to program my applications.
My OS: macOS Monterey on a 2018 i5 Macbook Pro
With Tools:
- ZSH 5.8.1 (x86_64-apple-darwin21.0)
- Python 3.10.0
- Brew 3.5.3 with cmake, ninja, dfu-util, ccache, python
- esptool.py v3.2 (already used successfully with the Arduino IDE)
But as I'm running this command:
[Codebox]. $HOME/esp/esp-idf/export.sh
[/Codebox]
I get a veryyy long & bulky output - here is a snippet:
[Codebox]
Detecting the Python interpreter
Checking "python3" ...
Python 3.10.0
"python3" has been detected
Checking Python compatibility
Checking other ESP-IDF version.
usage: python -m json.tool [-h]
[--sort-keys]
[--no-ensure-ascii]
[--json-lines]
[--indent INDENT | --tab | --no-indent | --compact]
[infile]
[outfile]
python -m json.tool: error: argument infile: can't open '': [Errno 2] No such file or directory: ''
Adding ESP-IDF tools to PATH...
usage: python -m json.tool [-h]
[--sort-keys]
[--no-ensure-ascii]
[--json-lines]
[--indent INDENT | --tab | --no-indent | --compact]
[infile]
[outfile]
python -m json.tool: error: argument infile: can't open 'export OPENOCD_SCRIPTS="/Users/carl/.espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/share/openocd/scripts";export IDF_PYTHON_ENV_PATH="/Users/carl/.espressif/python_env/idf5.0_py3.10_env";export ESP_IDF_VERSION="5.0";export PATH="/Users/carl/.espressif/tools/xtensa-esp-elf-gdb/11.2_20220529/xtensa-esp-elf-gdb/bin:/Users/carl/.espressif/tools/riscv32-esp-elf-gdb...
[/Codebox]
And at the end:
[Codebox]
...rl/opt/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:
idf.py build
env: idf.py: No such file or directory
usage: python -m json.tool [-h]
[--sort-keys]
[--no-ensure-ascii]
[--json-lines]
[--indent INDENT | --tab | --no-indent | --compact]
[infile]
[outfile]
python -m json.tool: error: argument infile: can't open '': [Errno 2] No such file or directory: ''
WARNING: Failed to load shell autocompletion for zsh version: 5.8.1!
[/Codebox]
Can you help me? Hopefully, I posted this problem in the right category...
Thanks in advance
NEOZEO