Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyserial error when trying to use tool on OSX Big Sur #29

Open
mikevanis opened this issue Jan 8, 2021 · 8 comments
Open

pyserial error when trying to use tool on OSX Big Sur #29

mikevanis opened this issue Jan 8, 2021 · 8 comments

Comments

@mikevanis
Copy link

mikevanis commented Jan 8, 2021

When trying to use the tool on Mac OSX Big Sur, esptool fails to execute.

Traceback (most recent call last):
  File "esptool.py", line 57, in <module>
  File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "serial/tools/list_ports.py", line 29, in <module>
  File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "serial/tools/list_ports_posix.py", line 31, in <module>
  File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "serial/tools/list_ports_osx.py", line 32, in <module>
ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found
Failed to execute script esptool
SPIFFS Upload failed!

I believe this is similar to the problem experienced with the arduino esp32 core (as mentioned here).

@delcomp
Copy link

delcomp commented Feb 3, 2021

Did you find a solution for this issue?

@mikevanis
Copy link
Author

No actually, I've been getting by using mkspiffs and esptool directly and forego this tool for now until it's fixed :)

@vindolin
Copy link

vindolin commented Feb 3, 2021

Here's more info about it and a fix: pyserial/pyserial#509 (comment)

@delcomp
Copy link

delcomp commented Feb 3, 2021

Ok, found my own solution. I have a virtual machine running 10.14 (a Parallels setup). Quickly installed Arduino IDE, the ESP32 library, this tool and a driver for the serial port. Then made a shared folder between the virtual machine and my Big Sur os. Now I can use the 10.14 to write the SPIFFS of my ESP32.

Once setup it's fast to work with.

@lorol
Copy link

lorol commented Feb 3, 2021

You can check the last PR at my clone of this repository. I may be helpful for you.

@delcomp
Copy link

delcomp commented Feb 5, 2021

Thanks @lorol, that did the trick.
Mind you, the '!Erase Flash!' option still gives an error. All the other options do work now.

Erasing all Flash started...
Port: /dev/cu.usbserial-1413420

_>Traceback (most recent call last):
_> File "esptool.py", line 57, in
_> File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
_> File "serial/tools/list_ports.py", line 29, in
_> File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
_> File "serial/tools/list_ports_posix.py", line 31, in
_> File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
_> File "serial/tools/list_ports_osx.py", line 32, in
_>ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found
_>Failed to execute script esptool
!Erase Flash! Upload failed!

@lorol
Copy link

lorol commented Feb 6, 2021

@delcomp, thank you for the report. Probably @bergdahl would be able to help fixing it or give some hints.

@bergdahl
Copy link

bergdahl commented Feb 6, 2021

Basically the fix I made was to remove the use of the old "esptool" binary file and make it use "esptool.py" instead. I also changed the call to "python3 esptool.py" as Python 2 is obsolete.
The underlying problem is a change in Big Sur that forces and update to Pyserial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants