I followed the guidelines on
to install my esp-32 board, WEMOS lolin32.
But whenever I try to upload a sketch connected to port COM4, I get the error (and my board is properly connected):
Serial port COM4 Traceback (most recent call last): File "esptool.py", line 2959, in <module> File "esptool.py", line 2952, in _main File "esptool.py", line 2652, in main File "esptool.py", line 222, in __init__ File "site-packages\serial\__init__.py", line 88, in serial_for_url File "site-packages\serial\serialwin32.py", line 62, in open serial.serialutil.SerialException: could not open port 'COM4': WindowsError(5, 'Access is denied.') Failed to execute script esptool the selected serial port Failed to execute script esptool does not exist or your board is not connected
Error screenshot –> https://imgur.com/lpMye6m
Hi Frank
Are you sure you’re selecting the right COM port?
Also, are you using a good and short USB cable?
Very long USB cables can result in a similar error.
A similar question was posted here: https://rntlab.com/question/the-selected-serial-port-failed-to-execute-script-esptool-2/ can you see if that helps?
Regards,
Sara
Hello,
I changed the port from COM4 to COM12 and it worked. I’m now able to upload sketches to my board, and the errors are gone. Thanks.