ESP32 Huzzah V2 on a Mac - python issues ??

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mowog44
 
Posts: 5
Joined: Thu Sep 22, 2022 5:39 am

ESP32 Huzzah V2 on a Mac - python issues ??

Post by mowog44 »

Hi All.

Just got my new Huzzah v2 and followed all the instructions to install software - inc. the new chip driver, latest Arduino IDE and the esp32 board support (with multiple restarts),
Plug it in, select the Adafruit Feather ESP32 V2 board, copy blink code into the IDE, hit verify and ....
Errors!! :(

Any help and guidance much appreciated.
Error text below.


Traceback (most recent call last):
File "esptool/loader.py", line 48, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "serial/tools/list_ports.py", line 31, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "serial/tools/list_ports_posix.py", line 33, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "serial/tools/list_ports_osx.py", line 26, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "ctypes/__init__.py", line 7, in <module>
ImportError: dlopen(/var/folders/t8/3t_jtzdd2xx24sy5z9lp1ng00000gn/T/_MEIPx0cMp/lib-dynload/_ctypes.cpython-38-darwin.so, 2): Symbol not found: _ffi_closure_alloc
Referenced from: /var/folders/t8/3t_jtzdd2xx24sy5z9lp1ng00000gn/T/_MEIPx0cMp/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/t8/3t_jtzdd2xx24sy5z9lp1ng00000gn/T/_MEIPx0cMp/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 493, in exec_module
File "esptool/__init__.py", line 42, 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 493, 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 493, 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 493, in exec_module
File "esptool/loader.py", line 53, in <module>
AttributeError: module 'sys' has no attribute 'VERSION'
[831] Failed to execute script 'esptool' due to unhandled exception!

exit status 1

Compilation error: exit status 1

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: ESP32 Huzzah V2 on a Mac - python issues ??

Post by adafruit_support_carter »

What version of Mac OS are you running?

User avatar
mowog44
 
Posts: 5
Joined: Thu Sep 22, 2022 5:39 am

Re: ESP32 Huzzah V2 on a Mac - python issues ??

Post by mowog44 »

MacOS Mojave
10.14.6

User avatar
mowog44
 
Posts: 5
Joined: Thu Sep 22, 2022 5:39 am

Re: ESP32 Huzzah V2 on a Mac - python issues ??

Post by mowog44 »

adafruit_support_carter wrote: Thu Sep 22, 2022 11:50 am What version of Mac OS are you running?
MacOS Mojave
10.14.6

User avatar
mowog44
 
Posts: 5
Joined: Thu Sep 22, 2022 5:39 am

Re: ESP32 Huzzah V2 on a Mac - python issues ??

Post by mowog44 »

Now managed to get "blink" to compile with no errors by winding back the ESP32 BSP to version 2.0.4 rather than 2.0.5.

However I still can't get it to upload to the feather. I'm starting to wonder if the new chipset drivers are not working properly :(

Here is the error message.

Sketch uses 235441 bytes (17%) of program storage space. Maximum is 1310720 bytes.
Global variables use 16168 bytes (4%) of dynamic memory, leaving 311512 bytes for local variables. Maximum is 327680 bytes.
Traceback (most recent call last):
File "serial/serialposix.py", line 322, in open
OSError: [Errno 16] Resource busy: '/dev/cu.usbmodem54790241221'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "esptool.py", line 5387, in <module>
File "esptool.py", line 5380, in _main
File "esptool.py", line 4687, in main
File "esptool.py", line 114, in get_default_connected_device
File "esptool.py", line 320, in __init__
File "serial/__init__.py", line 90, in serial_for_url
File "serial/serialposix.py", line 325, in open
serial.serialutil.SerialException: [Errno 16] could not open port /dev/cu.usbmodem54790241221: [Errno 16] Resource busy: '/dev/cu.usbmodem54790241221'
[965] Failed to execute script 'esptool' due to unhandled exception!
esptool.py v3.3
Serial port /dev/cu.usbmodem54790241221
Failed uploading: uploading error: exit status 1

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: ESP32 Huzzah V2 on a Mac - python issues ??

Post by adafruit_support_carter »

There's possibly an issue with that Mac OS version and the 2.0.5 BSP release.

For the upload issue with 2.0.4, looks like the COM port has been taken:

Code: Select all

serial.serialutil.SerialException: [Errno 16] could not open port /dev/cu.usbmodem54790241221: [Errno 16] Resource busy: '/dev/cu.usbmodem54790241221'
Check and see if some other software has the COM port open.

User avatar
mowog44
 
Posts: 5
Joined: Thu Sep 22, 2022 5:39 am

Re: ESP32 Huzzah V2 on a Mac - python issues ??

Post by mowog44 »

adafruit_support_carter wrote: Fri Sep 23, 2022 11:12 am There's possibly an issue with that Mac OS version and the 2.0.5 BSP release.

For the upload issue with 2.0.4, looks like the COM port has been taken:

Code: Select all

serial.serialutil.SerialException: [Errno 16] could not open port /dev/cu.usbmodem54790241221: [Errno 16] Resource busy: '/dev/cu.usbmodem54790241221'
Check and see if some other software has the COM port open.
There is nothing else physically plugged in and doesn't appear to be anything else using that port software wise.
:(

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”