-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ESPEFUSE doesn't close COM port when throws an exception when called from Python (ESPTOOL-557) #803
Comments
Hi I use Python script which includes several subsequent calls of ESPTOOL and ESPEFUSE for production purpose.
and ESPEFUSE throws an exception which leads to my Python script termination. But I need the further ESPTOOL calls in my script to be executed. So I decided to add exception handler:
I can get and print an exception in this case:
But when ESPEFUSE is called further in my Python script I get the following error:
So looks like ESPEFUSE doesn't release the COM port when throw an exception. ESPTOOL version: 4.3 Are there any workaround? |
Hi @reykada, |
Hello @reykada, To try it, please clone this repo and install it in development mode with:
You can try your script at this point - it should still fail. Then please download Thank you! |
Hi @radimkarnis It does work! The port is being closed when ESPEFUSE throws an exception. |
@reykada thanks for your help and the report! The fix has been merged to master. |
Operating System
Windows 10 Pro 21H2
Esptool Version
v4.3
Python Version
Python 3.9.6
Chip Description
ESP32-D0WD-V3 (revision v3.0)
Device Description
NodeMCU ESP-32 v1.1
Hardware Configuration
No response
How is Esptool Run
No IDE
Full Esptool Command Line that Was Run
From Python script
Esptool Output
More Information
No response
Other Steps to Reproduce
No response
I Have Read the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: