Bug 2092910 - [abrt] esptool: open(): serialposix.py:268:open:serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
Summary: [abrt] esptool: open(): serialposix.py:268:open:serial.serialutil.SerialExcep...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: esptool
Version: 36
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karolina Surma
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:f78f0d3857025df84accc3dceab...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-02 14:16 UTC by Chipeng Li
Modified: 2022-07-02 01:47 UTC (History)
3 users (show)

Fixed In Version: esptool-4.1-3.fc37 esptool-3.3.1-1.fc35 esptool-3.3.1-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-22 12:49:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.61 KB, text/plain)
2022-06-02 14:16 UTC, Chipeng Li
no flags Details
File: cpuinfo (2.56 KB, text/plain)
2022-06-02 14:16 UTC, Chipeng Li
no flags Details
File: environ (4.16 KB, text/plain)
2022-06-02 14:16 UTC, Chipeng Li
no flags Details
File: mountinfo (3.28 KB, text/plain)
2022-06-02 14:16 UTC, Chipeng Li
no flags Details
File: namespaces (172 bytes, text/plain)
2022-06-02 14:16 UTC, Chipeng Li
no flags Details
File: open_fds (310 bytes, text/plain)
2022-06-02 14:16 UTC, Chipeng Li
no flags Details

Description Chipeng Li 2022-06-02 14:16:39 UTC
Description of problem:
"could not open port" error has not handled.

Version-Release number of selected component:
esptool-3.2-2.fc36

Additional info:
reporter:       libreport-2.17.1
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-a8be372b-bc99-4c60-ae91-3a3ccca15680.scope
cmdline:        /usr/bin/python3 -s /usr/bin/esptool --chip esp32c3 --port /dev/ttyUSB0 --baud 921600 flash_id
crash_function: open
exception_type: FileNotFoundError
executable:     /usr/bin/esptool
interpreter:    python3-3.10.4-1.fc36.x86_64
kernel:         5.17.11-300.fc36.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
serialposix.py:268:open:serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/serial/serialposix.py", line 265, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/esptool", line 5143, in <module>
    _main()
  File "/usr/bin/esptool", line 5136, in _main
    main()
  File "/usr/bin/esptool", line 4541, in main
    esp = esp or get_default_connected_device(ser_list, port=args.port, connect_attempts=args.connect_attempts,
  File "/usr/bin/esptool", line 125, in get_default_connected_device
    _esp = chip_class(each_port, initial_baud, trace)
  File "/usr/bin/esptool", line 329, in __init__
    self._port = serial.serial_for_url(port)
  File "/usr/lib/python3.10/site-packages/serial/__init__.py", line 88, in serial_for_url
    instance.open()
  File "/usr/lib/python3.10/site-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'

Local variables in innermost frame:
self: Serial<id=0x7f8bb7f0d4b0, open=False>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

Potential duplicate: bug 1925968

Comment 1 Chipeng Li 2022-06-02 14:16:43 UTC
Created attachment 1886103 [details]
File: backtrace

Comment 2 Chipeng Li 2022-06-02 14:16:44 UTC
Created attachment 1886104 [details]
File: cpuinfo

Comment 3 Chipeng Li 2022-06-02 14:16:45 UTC
Created attachment 1886105 [details]
File: environ

Comment 4 Chipeng Li 2022-06-02 14:16:47 UTC
Created attachment 1886106 [details]
File: mountinfo

Comment 5 Chipeng Li 2022-06-02 14:16:48 UTC
Created attachment 1886107 [details]
File: namespaces

Comment 6 Chipeng Li 2022-06-02 14:16:49 UTC
Created attachment 1886108 [details]
File: open_fds

Comment 7 Karolina Surma 2022-06-06 14:07:02 UTC
Does /dev/ttyUSB0 exist on your system?

Comment 8 Chipeng Li 2022-06-08 20:17:15 UTC
no ttyUSB0 in there.

maybe you can put a try-except block in esptool? to avoid triggering abrt.

Comment 9 Karolina Surma 2022-06-09 12:52:18 UTC
Thank you for the report. I wasn't aware this problem triggers abrt.
See upstream PR: https://github.com/espressif/esptool/pull/751.
We will backport it to esptool in Fedora 36.

Comment 11 Fedora Update System 2022-06-22 12:46:27 UTC
FEDORA-2022-16e68a849a has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-16e68a849a

Comment 12 Fedora Update System 2022-06-22 12:49:24 UTC
FEDORA-2022-16e68a849a has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2022-06-23 06:50:33 UTC
FEDORA-2022-6e23de3038 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-6e23de3038

Comment 14 Fedora Update System 2022-06-23 06:51:06 UTC
FEDORA-2022-4c59060b08 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-4c59060b08

Comment 15 Fedora Update System 2022-06-24 00:50:00 UTC
FEDORA-2022-6e23de3038 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-6e23de3038`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-6e23de3038

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2022-06-24 02:22:13 UTC
FEDORA-2022-4c59060b08 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-4c59060b08`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-4c59060b08

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2022-07-02 01:19:53 UTC
FEDORA-2022-4c59060b08 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2022-07-02 01:47:39 UTC
FEDORA-2022-6e23de3038 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.