ESP-IDF export.sh enters some loop when running from bash script

honestech
Posts: 3
Joined: Thu Oct 22, 2020 2:34 pm

ESP-IDF export.sh enters some loop when running from bash script

Postby honestech » Thu Sep 16, 2021 2:07 pm

Hi,

I've installed ESP-IDF and can get environment variables by source ~/esp/esp-idf/export.sh

Code: Select all

honestech@honestech-pc:~/esp/myapp$ source ~/esp/esp-idf/export.sh
Setting IDF_PATH to '/home/honestech/esp/esp-idf'
Detecting the Python interpreter
Checking "python" ...
Checking "python3" ...
Python 3.6.9
"python3" has been detected
Adding ESP-IDF tools to PATH...
Using Python interpreter in /home/honestech/.espressif/python_env/idf4.3_py3.6_env/bin/python
Checking if Python packages are up to date...
Python requirements from /home/honestech/esp/esp-idf/requirements.txt are satisfied.
Added the following directories to PATH:
  /home/honestech/esp/esp-idf/components/esptool_py/esptool /home/honestech/esp/esp-idf/components/espcoredump /home/honestech/esp/esp-idf/components/partition_table /home/honestech/esp/esp-idf/components/app_update /home/honestech/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin /home/honestech/.espressif/tools/xtensa-esp32s2-elf/esp-2021r1-8.4.0/xtensa-esp32s2-elf/bin /home/honestech/.espressif/tools/xtensa-esp32s3-elf/esp-2021r1-8.4.0/xtensa-esp32s3-elf/bin /home/honestech/.espressif/tools/riscv32-esp-elf/esp-2021r1-8.4.0/riscv32-esp-elf/bin /home/honestech/.espressif/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin /home/honestech/.espressif/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin /home/honestech/.espressif/tools/openocd-esp32/v0.10.0-esp32-20210401/openocd-esp32/bin /home/honestech/.espressif/python_env/idf4.3_py3.6_env/bin /home/honestech/esp/esp-idf/tools 
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build

But when I run it from my bash script, it shows all the same logs as above and then enters an infinite loop and didn't return to the terminal. So I can't run the next script.
When I tried to break with Ctrl+C, getting these logs.

Code: Select all

^CTraceback (most recent call last):
  File "/home/honestech/esp/esp-idf/tools/idf_tools.py", line 43, in <module>
    import argparse
KeyboardInterrupt
When I comment this line, then it disappears.
https://github.com/espressif/esp-idf/bl ... rt.sh#L168


Why am I getting this? I guess it's working for you well... Anyone got this?

martin.gano
Posts: 2
Joined: Fri Nov 27, 2020 10:41 pm

Re: ESP-IDF export.sh enters some loop when running from bash script

Postby martin.gano » Thu Sep 16, 2021 4:57 pm

Hi, honestech,

thank you for reaching us.

I am currently not able to reproduce the issue. Could you please give me more information? I'd like to know your specific version (or commit hash) of esp-idf and also you bash version. As far as I understand, you have some bash script that contains `source export.sh` and you are running that bash script (which doesn't work), right?

When you run your script and then kill it, is the traceback always the same? I mean:

Code: Select all

^CTraceback (most recent call last):
  File "/home/honestech/esp/esp-idf/tools/idf_tools.py", line 43, in <module>
    import argparse
KeyboardInterrupt

Who is online

Users browsing this forum: Baldhead and 130 guests