ESP32 Compilation error: exit status 1

It's probably a "new guy thing," but I need help with an error when attempting to upload to my ESP32 WROOM board. The error that comes in is:

<Traceback (most recent call last):
  File "esptool/loader.py", line 57, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "serial/tools/list_ports.py", line 31, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "serial/tools/list_ports_posix.py", line 33, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "serial/tools/list_ports_osx.py", line 26, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "ctypes/__init__.py", line 7, in <module>
ImportError: dlopen(/var/folders/bp/0rt1slds65sdr24j6vmrcrbw0000gn/T/_MEIZLfcWU/lib-dynload/_ctypes.cpython-38-darwin.so, 2): Symbol not found: _ffi_closure_alloc
  Referenced from: /var/folders/bp/0rt1slds65sdr24j6vmrcrbw0000gn/T/_MEIZLfcWU/lib-dynload/_ctypes.cpython-38-darwin.so (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libffi.dylib
 in /var/folders/bp/0rt1slds65sdr24j6vmrcrbw0000gn/T/_MEIZLfcWU/lib-dynload/_ctypes.cpython-38-darwin.so

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "esptool.py", line 31, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "esptool/__init__.py", line 41, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "esptool/cmds.py", line 14, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "esptool/bin_image.py", line 14, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "esptool/loader.py", line 62, in <module>
AttributeError: module 'sys' has no attribute 'VERSION'
[33982] Failed to execute script 'esptool' due to unhandled exception!

exit status 1

Compilation error: exit status 1/>

For a program, I simply used the basic void setup / void loop with no other code to rule out syntax errors.
I am using Arduino Version 2.2.1

1 Like

If you own 30-pin ESP32 Classic Board, then select ALKS ESP32 Board in IDE 2.2.1 and upload the following sketch which works well for me.

#define RLED 2//onboard BlueLED

void setup()
{
  Serial.begin(115200);
  pinMode(RLED, OUTPUT);
}

void loop()
{
  digitalWrite(RLED, HIGH);
  delay(1000);
  digitalWrite(RLED, LOW);
  delay(1000);
}

I normally use IDE 1.8.19 and select the board as "ESP32 Dev Module".

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.