You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
STDOUT : b'esptool.py v4.6.1\r\nSerial port COM9\r\nConnecting......................................\r\n\r\nA fatal error occurred: Failed to connect to ESP32: No serial data received.\r\nFor troubleshooting steps visit:https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html\r\n'
STDERR : b''
What is the Expected Behaviour?
STDOUT : b'esptool.py v4.6.1\r\nSerial port COM9\r\nConnecting......................................\r\n\r\n
STDERR : b''A fatal error occurred: Failed to connect to ESP32: No serial data received.\r\nFor troubleshooting steps visit:
github-actionsbot
changed the title
Stderr empty when calling esptool with subprocess.Popen
Stderr empty when calling esptool with subprocess.Popen (ESPTOOL-696)
Jun 9, 2023
It will be implemented as a part of the next major release (v5.0) since it is a breaking change for current scripts relying on reading the stdout output.
Operating System
Python
Esptool Version
V4.6.1
Python Version
Python 3.11
Full Esptool Command Line that Was Run
esptool -p COM9 --chip esp32 read_mac
Esptool Output
What is the Expected Behaviour?
STDOUT : b'esptool.py v4.6.1\r\nSerial port COM9\r\nConnecting......................................\r\n\r\n
STDERR : b''A fatal error occurred: Failed to connect to ESP32: No serial data received.\r\nFor troubleshooting steps visit:
https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html\r\n'"
More Information
Hello guys,
I tried to catch esptool error in stderr from subprocess.Popen with the following code :
def read_mac(self, port) :
command = [ESPTOOL_PY, '-p', port, '--chip', 'esp32', 'read_mac']
send_command(command)
def send_command(command: list[str]) :
out = subprocess.Popen([sys.executable] + command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
stdout, stderr = out.communicate()
Thanks for your help :)
Other Steps to Reproduce
No response
The text was updated successfully, but these errors were encountered: