Ben
Ben

Reputation: 1

Syntax error when trying to execute Python script to burn efuse on ESP32 board

I own an ESP32 board (Lilygo TTGO T-Display). I'd like to burn the internal efuses that select the interval voltage so I always have a 3.3V regulator.

This is explained here: Note about GPIO12

I have downlaoded and installed everything.

When I run the command:

python3 components/esptool_py/esptool/espefuse.py set_flash_voltage 3.3V

I get:

components/esptool_py/esptool/espefuse.py: line 7: import: command not found
components/esptool_py/esptool/espefuse.py: line 8: import: command not found
components/esptool_py/esptool/espefuse.py: line 11: syntax error near unexpected token `subprocess.run'
components/esptool_py/esptool/espefuse.py: line 11: `    sys.exit(subprocess.run([sys.executable, '-m', 'espefuse'] + sys.argv[1:]).returncode)'

With this command :

python3 -m  espefuse set_flash_voltage 3.3V 

I get :

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/benjaminghedini/esp/esp-idf/components/esptool_py/esptool/espefuse.py", line 11, in <module>
    sys.exit(subprocess.run([sys.executable, '-m', 'espefuse'] + sys.argv[1:]).returncode)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1885, in _execute_child
    self.pid = _fork_exec(
               ^^^^^^^^^^^
BlockingIOError: [Errno 35] Resource temporarily unavailable

Here's the espefuse.py file:

#
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
#
# SPDX-License-Identifier: Apache-2.0
#

import subprocess
import sys

if __name__ == '__main__':
    sys.exit(subprocess.run([sys.executable, '-m', 'espefuse'] + sys.argv[1:]).returncode)

I have read the documentations three times, downloaded and installed everything needed.

What am I doing wrong?

Upvotes: 0

Views: 102

Answers (0)

Related Questions