An issue with burning firmware using NRFUtil failed

The following error occurs when I plug in the USB cable to burn the firmware,This is an interesting bug: it usually fails on the first burn, but succeeds on the second or third burn

Traceback (most recent call last):
  File "serial/serialposix.py", line 322, in open
FileNotFoundError: [Errno 2] No such file or directory: '/dev/cu.usbmodemC9B8D7EFE28C1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "nordicsemi/dfu/dfu_transport_serial.py", line 198, in open
  File "serial/serialutil.py", line 244, in __init__
  File "serial/serialposix.py", line 325, in open
serial.serialutil.SerialException: [Errno 2] could not open port /dev/cu.usbmodemC9B8D7EFE28C1: [Errno 2] No such file or directory: '/dev/cu.usbmodemC9B8D7EFE28C1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "nordicsemi/__main__.py", line 1545, in <module>
  File "click/core.py", line 1137, in __call__
  File "click/core.py", line 1062, in main
  File "click/core.py", line 1668, in invoke
  File "click/core.py", line 1668, in invoke
  File "click/core.py", line 1404, in invoke
  File "click/core.py", line 763, in invoke
  File "nordicsemi/__main__.py", line 1022, in usb_serial
  File "nordicsemi/__main__.py", line 978, in do_serial
  File "nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
  File "nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image
  File "nordicsemi/dfu/dfu_transport_serial.py", line 202, in open
pc_ble_driver_py.exceptions.NordicSemiException: Serial port could not be opened on /dev/cu.usbmodemC9B8D7EFE28C1. Reason: could not open port /dev/cu.usbmodemC9B8D7EFE28C1: [Errno 2] No such file or directory: '/dev/cu.usbmodemC9B8D7EFE28C1'
[9537] Failed to execute script '__main__' due to unhandled exception!

Related