Skip to content

Add custom overwritable build dir to pytest

Sign in for the full log view
GitHub Actions / Test Results failed Apr 16, 2026 in 0s

6 errors, 27 pass in 2m 6s

33 tests  ±0   27 ✅ +2   2m 6s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0   6 🔥  - 2 

Results for commit 565a663. ± Comparison against earlier commit b7c5aac.

Annotations

Check failure on line 7 in examples/display/pytest_display.py

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_example_display[esp32_s3_lcd_ev_board_2]@esp32_s3_lcd_ev_board_2 (examples.display.pytest_display) with error

test_results/test_results__release-v5.5/test_results__release-v5.5.xml [took 0s]
Raw output
failed on setup with "esptool.util.FatalError: Could not open /dev/boards/esp32_s3_lcd_ev_board_2, the port is busy or doesn't exist.
([Errno 2] could not open port /dev/boards/esp32_s3_lcd_ev_board_2: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2')

Hint: Check if the port is correct and ESP connected"
self = Serial<id=0x743735090e50, open=False>(port='/dev/boards/esp32_s3_lcd_ev_board_2', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
>           self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E           FileNotFoundError: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:322: FileNotFoundError

During handling of the above exception, another exception occurred:

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x743735091280>
port = '/dev/boards/esp32_s3_lcd_ev_board_2', baud = 115200
trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
>               self._port.open()

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Serial<id=0x743735090e50, open=False>(port='/dev/boards/esp32_s3_lcd_ev_board_2', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
            self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
        except OSError as msg:
            self.fd = None
>           raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
E           serial.serialutil.SerialException: [Errno 2] could not open port /dev/boards/esp32_s3_lcd_ev_board_2: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:325: SerialException

During handling of the above exception, another exception occurred:

args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_idf.app.IdfApp'>, 'serial': <...ded_idf.app.IdfApp object at 0x7437350e5fa0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7437350e4440>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x743734e29f80>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:518: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:1151: in serial
    return serial_gn(**locals())
           ^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/dut_factory.py:485: in serial_gn
    flash_serial = cls(**_drop_none_kwargs(kwargs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_idf/serial.py:42: in __init__
    super().__init__(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_serial_esp/serial.py:113: in __init__
    self.esp = esptool.get_default_connected_device(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/__init__.py:1261: in get_default_connected_device
    _esp = chip_class(each_port, initial_baud, trace)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x743735091280>
port = '/dev/boards/esp32_s3_lcd_ev_board_2', baud = 115200
trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
                self._port.open()
            except serial.serialutil.SerialException as e:
                port_issues = [
                    [  # does not exist error
                        re.compile(r"Errno 2|FileNotFoundError", re.IGNORECASE),
                        "Check if the port is correct and ESP connected",
                    ],
                    [  # busy port error
                        re.compile(r"Access is denied", re.IGNORECASE),
                        "Check if the port is not used by another task",
                    ],
                ]
                if sys.platform.startswith("linux"):
                    port_issues.append(
                        [  # permission denied error
                            re.compile(r"Permission denied", re.IGNORECASE),
                            ("Try to add user into dialout or uucp group."),
                        ],
                    )
    
                hint_msg = ""
                for port_issue in port_issues:
                    if port_issue[0].search(str(e)):
                        hint_msg = f"\nHint: {port_issue[1]}\n"
                        break
    
>               raise FatalError(
                    f"Could not open {port}, the port is busy or doesn't exist."
                    f"\n({e})\n"
                    f"{hint_msg}"
                )
E               esptool.util.FatalError: Could not open /dev/boards/esp32_s3_lcd_ev_board_2, the port is busy or doesn't exist.
E               ([Errno 2] could not open port /dev/boards/esp32_s3_lcd_ev_board_2: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2')
E               
E               Hint: Check if the port is correct and ESP connected

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:367: FatalError

Check failure on line 56 in examples/display_lvgl_benchmark/pytest_display_lvgl_benchmark.py

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_example_lvgl_benchmark[esp32_s3_lcd_ev_board_2]@esp32_s3_lcd_ev_board_2 (examples.display_lvgl_benchmark.pytest_display_lvgl_benchmark) with error

test_results/test_results__release-v5.5/test_results__release-v5.5.xml [took 0s]
Raw output
failed on setup with "esptool.util.FatalError: Could not open /dev/boards/esp32_s3_lcd_ev_board_2, the port is busy or doesn't exist.
([Errno 2] could not open port /dev/boards/esp32_s3_lcd_ev_board_2: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2')

Hint: Check if the port is correct and ESP connected"
self = Serial<id=0x743735272c20, open=False>(port='/dev/boards/esp32_s3_lcd_ev_board_2', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
>           self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E           FileNotFoundError: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:322: FileNotFoundError

During handling of the above exception, another exception occurred:

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x7437352731a0>
port = '/dev/boards/esp32_s3_lcd_ev_board_2', baud = 115200
trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
>               self._port.open()

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Serial<id=0x743735272c20, open=False>(port='/dev/boards/esp32_s3_lcd_ev_board_2', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
            self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
        except OSError as msg:
            self.fd = None
>           raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
E           serial.serialutil.SerialException: [Errno 2] could not open port /dev/boards/esp32_s3_lcd_ev_board_2: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:325: SerialException

During handling of the above exception, another exception occurred:

args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_idf.app.IdfApp'>, 'serial': <...ded_idf.app.IdfApp object at 0x743735273350>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x743735273650>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x743734e55800>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:518: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:1151: in serial
    return serial_gn(**locals())
           ^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/dut_factory.py:485: in serial_gn
    flash_serial = cls(**_drop_none_kwargs(kwargs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_idf/serial.py:42: in __init__
    super().__init__(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_serial_esp/serial.py:113: in __init__
    self.esp = esptool.get_default_connected_device(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/__init__.py:1261: in get_default_connected_device
    _esp = chip_class(each_port, initial_baud, trace)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x7437352731a0>
port = '/dev/boards/esp32_s3_lcd_ev_board_2', baud = 115200
trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
                self._port.open()
            except serial.serialutil.SerialException as e:
                port_issues = [
                    [  # does not exist error
                        re.compile(r"Errno 2|FileNotFoundError", re.IGNORECASE),
                        "Check if the port is correct and ESP connected",
                    ],
                    [  # busy port error
                        re.compile(r"Access is denied", re.IGNORECASE),
                        "Check if the port is not used by another task",
                    ],
                ]
                if sys.platform.startswith("linux"):
                    port_issues.append(
                        [  # permission denied error
                            re.compile(r"Permission denied", re.IGNORECASE),
                            ("Try to add user into dialout or uucp group."),
                        ],
                    )
    
                hint_msg = ""
                for port_issue in port_issues:
                    if port_issue[0].search(str(e)):
                        hint_msg = f"\nHint: {port_issue[1]}\n"
                        break
    
>               raise FatalError(
                    f"Could not open {port}, the port is busy or doesn't exist."
                    f"\n({e})\n"
                    f"{hint_msg}"
                )
E               esptool.util.FatalError: Could not open /dev/boards/esp32_s3_lcd_ev_board_2, the port is busy or doesn't exist.
E               ([Errno 2] could not open port /dev/boards/esp32_s3_lcd_ev_board_2: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2')
E               
E               Hint: Check if the port is correct and ESP connected

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:367: FatalError

Check failure on line 7 in examples/display_lvgl_demos/pytest_display_lvgl_demos.py

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_example_lvgl_demos[esp32_s3_lcd_ev_board_2]@esp32_s3_lcd_ev_board_2 (examples.display_lvgl_demos.pytest_display_lvgl_demos) with error

test_results/test_results__release-v5.5/test_results__release-v5.5.xml [took 0s]
Raw output
failed on setup with "esptool.util.FatalError: Could not open /dev/boards/esp32_s3_lcd_ev_board_2, the port is busy or doesn't exist.
([Errno 2] could not open port /dev/boards/esp32_s3_lcd_ev_board_2: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2')

Hint: Check if the port is correct and ESP connected"
self = Serial<id=0x74373528ba60, open=False>(port='/dev/boards/esp32_s3_lcd_ev_board_2', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
>           self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E           FileNotFoundError: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:322: FileNotFoundError

During handling of the above exception, another exception occurred:

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x74373528b7d0>
port = '/dev/boards/esp32_s3_lcd_ev_board_2', baud = 115200
trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
>               self._port.open()

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Serial<id=0x74373528ba60, open=False>(port='/dev/boards/esp32_s3_lcd_ev_board_2', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
            self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
        except OSError as msg:
            self.fd = None
>           raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
E           serial.serialutil.SerialException: [Errno 2] could not open port /dev/boards/esp32_s3_lcd_ev_board_2: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:325: SerialException

During handling of the above exception, another exception occurred:

args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_idf.app.IdfApp'>, 'serial': <...ded_idf.app.IdfApp object at 0x74373528b3b0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x743735289250>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x743734e563e0>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:518: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:1151: in serial
    return serial_gn(**locals())
           ^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/dut_factory.py:485: in serial_gn
    flash_serial = cls(**_drop_none_kwargs(kwargs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_idf/serial.py:42: in __init__
    super().__init__(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_serial_esp/serial.py:113: in __init__
    self.esp = esptool.get_default_connected_device(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/__init__.py:1261: in get_default_connected_device
    _esp = chip_class(each_port, initial_baud, trace)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x74373528b7d0>
port = '/dev/boards/esp32_s3_lcd_ev_board_2', baud = 115200
trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
                self._port.open()
            except serial.serialutil.SerialException as e:
                port_issues = [
                    [  # does not exist error
                        re.compile(r"Errno 2|FileNotFoundError", re.IGNORECASE),
                        "Check if the port is correct and ESP connected",
                    ],
                    [  # busy port error
                        re.compile(r"Access is denied", re.IGNORECASE),
                        "Check if the port is not used by another task",
                    ],
                ]
                if sys.platform.startswith("linux"):
                    port_issues.append(
                        [  # permission denied error
                            re.compile(r"Permission denied", re.IGNORECASE),
                            ("Try to add user into dialout or uucp group."),
                        ],
                    )
    
                hint_msg = ""
                for port_issue in port_issues:
                    if port_issue[0].search(str(e)):
                        hint_msg = f"\nHint: {port_issue[1]}\n"
                        break
    
>               raise FatalError(
                    f"Could not open {port}, the port is busy or doesn't exist."
                    f"\n({e})\n"
                    f"{hint_msg}"
                )
E               esptool.util.FatalError: Could not open /dev/boards/esp32_s3_lcd_ev_board_2, the port is busy or doesn't exist.
E               ([Errno 2] could not open port /dev/boards/esp32_s3_lcd_ev_board_2: [Errno 2] No such file or directory: '/dev/boards/esp32_s3_lcd_ev_board_2')
E               
E               Hint: Check if the port is correct and ESP connected

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:367: FatalError

Check failure on line 7 in examples/display/pytest_display.py

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_example_display[esp_box_3]@esp_box_3 (examples.display.pytest_display) with error

test_results/test_results__release-v5.5/test_results__release-v5.5.xml [took 0s]
Raw output
failed on setup with "esptool.util.FatalError: Could not open /dev/boards/esp_box_3, the port is busy or doesn't exist.
([Errno 2] could not open port /dev/boards/esp_box_3: [Errno 2] No such file or directory: '/dev/boards/esp_box_3')

Hint: Check if the port is correct and ESP connected"
self = Serial<id=0x786be9be5a80, open=False>(port='/dev/boards/esp_box_3', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
>           self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E           FileNotFoundError: [Errno 2] No such file or directory: '/dev/boards/esp_box_3'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:322: FileNotFoundError

During handling of the above exception, another exception occurred:

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x786be9be69f0>
port = '/dev/boards/esp_box_3', baud = 115200, trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
>               self._port.open()

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Serial<id=0x786be9be5a80, open=False>(port='/dev/boards/esp_box_3', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
            self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
        except OSError as msg:
            self.fd = None
>           raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
E           serial.serialutil.SerialException: [Errno 2] could not open port /dev/boards/esp_box_3: [Errno 2] No such file or directory: '/dev/boards/esp_box_3'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:325: SerialException

During handling of the above exception, another exception occurred:

args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_idf.app.IdfApp'>, 'serial': <...ded_idf.app.IdfApp object at 0x786be9be4230>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x786be99ae420>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x786be9751e40>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:518: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:1151: in serial
    return serial_gn(**locals())
           ^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/dut_factory.py:485: in serial_gn
    flash_serial = cls(**_drop_none_kwargs(kwargs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_idf/serial.py:42: in __init__
    super().__init__(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_serial_esp/serial.py:113: in __init__
    self.esp = esptool.get_default_connected_device(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/__init__.py:1261: in get_default_connected_device
    _esp = chip_class(each_port, initial_baud, trace)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x786be9be69f0>
port = '/dev/boards/esp_box_3', baud = 115200, trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
                self._port.open()
            except serial.serialutil.SerialException as e:
                port_issues = [
                    [  # does not exist error
                        re.compile(r"Errno 2|FileNotFoundError", re.IGNORECASE),
                        "Check if the port is correct and ESP connected",
                    ],
                    [  # busy port error
                        re.compile(r"Access is denied", re.IGNORECASE),
                        "Check if the port is not used by another task",
                    ],
                ]
                if sys.platform.startswith("linux"):
                    port_issues.append(
                        [  # permission denied error
                            re.compile(r"Permission denied", re.IGNORECASE),
                            ("Try to add user into dialout or uucp group."),
                        ],
                    )
    
                hint_msg = ""
                for port_issue in port_issues:
                    if port_issue[0].search(str(e)):
                        hint_msg = f"\nHint: {port_issue[1]}\n"
                        break
    
>               raise FatalError(
                    f"Could not open {port}, the port is busy or doesn't exist."
                    f"\n({e})\n"
                    f"{hint_msg}"
                )
E               esptool.util.FatalError: Could not open /dev/boards/esp_box_3, the port is busy or doesn't exist.
E               ([Errno 2] could not open port /dev/boards/esp_box_3: [Errno 2] No such file or directory: '/dev/boards/esp_box_3')
E               
E               Hint: Check if the port is correct and ESP connected

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:367: FatalError

Check failure on line 56 in examples/display_lvgl_benchmark/pytest_display_lvgl_benchmark.py

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_example_lvgl_benchmark[esp_box_3]@esp_box_3 (examples.display_lvgl_benchmark.pytest_display_lvgl_benchmark) with error

test_results/test_results__release-v5.5/test_results__release-v5.5.xml [took 0s]
Raw output
failed on setup with "esptool.util.FatalError: Could not open /dev/boards/esp_box_3, the port is busy or doesn't exist.
([Errno 2] could not open port /dev/boards/esp_box_3: [Errno 2] No such file or directory: '/dev/boards/esp_box_3')

Hint: Check if the port is correct and ESP connected"
self = Serial<id=0x786be986d210, open=False>(port='/dev/boards/esp_box_3', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
>           self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E           FileNotFoundError: [Errno 2] No such file or directory: '/dev/boards/esp_box_3'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:322: FileNotFoundError

During handling of the above exception, another exception occurred:

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x786be986cd10>
port = '/dev/boards/esp_box_3', baud = 115200, trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
>               self._port.open()

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Serial<id=0x786be986d210, open=False>(port='/dev/boards/esp_box_3', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
            self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
        except OSError as msg:
            self.fd = None
>           raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
E           serial.serialutil.SerialException: [Errno 2] could not open port /dev/boards/esp_box_3: [Errno 2] No such file or directory: '/dev/boards/esp_box_3'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:325: SerialException

During handling of the above exception, another exception occurred:

args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_idf.app.IdfApp'>, 'serial': <...ded_idf.app.IdfApp object at 0x786be9b8ad20>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x786be9b8a5d0>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x786be977c900>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:518: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:1151: in serial
    return serial_gn(**locals())
           ^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/dut_factory.py:485: in serial_gn
    flash_serial = cls(**_drop_none_kwargs(kwargs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_idf/serial.py:42: in __init__
    super().__init__(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_serial_esp/serial.py:113: in __init__
    self.esp = esptool.get_default_connected_device(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/__init__.py:1261: in get_default_connected_device
    _esp = chip_class(each_port, initial_baud, trace)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x786be986cd10>
port = '/dev/boards/esp_box_3', baud = 115200, trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
                self._port.open()
            except serial.serialutil.SerialException as e:
                port_issues = [
                    [  # does not exist error
                        re.compile(r"Errno 2|FileNotFoundError", re.IGNORECASE),
                        "Check if the port is correct and ESP connected",
                    ],
                    [  # busy port error
                        re.compile(r"Access is denied", re.IGNORECASE),
                        "Check if the port is not used by another task",
                    ],
                ]
                if sys.platform.startswith("linux"):
                    port_issues.append(
                        [  # permission denied error
                            re.compile(r"Permission denied", re.IGNORECASE),
                            ("Try to add user into dialout or uucp group."),
                        ],
                    )
    
                hint_msg = ""
                for port_issue in port_issues:
                    if port_issue[0].search(str(e)):
                        hint_msg = f"\nHint: {port_issue[1]}\n"
                        break
    
>               raise FatalError(
                    f"Could not open {port}, the port is busy or doesn't exist."
                    f"\n({e})\n"
                    f"{hint_msg}"
                )
E               esptool.util.FatalError: Could not open /dev/boards/esp_box_3, the port is busy or doesn't exist.
E               ([Errno 2] could not open port /dev/boards/esp_box_3: [Errno 2] No such file or directory: '/dev/boards/esp_box_3')
E               
E               Hint: Check if the port is correct and ESP connected

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:367: FatalError

Check failure on line 7 in examples/display_lvgl_demos/pytest_display_lvgl_demos.py

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_example_lvgl_demos[esp_box_3]@esp_box_3 (examples.display_lvgl_demos.pytest_display_lvgl_demos) with error

test_results/test_results__release-v5.5/test_results__release-v5.5.xml [took 0s]
Raw output
failed on setup with "esptool.util.FatalError: Could not open /dev/boards/esp_box_3, the port is busy or doesn't exist.
([Errno 2] could not open port /dev/boards/esp_box_3: [Errno 2] No such file or directory: '/dev/boards/esp_box_3')

Hint: Check if the port is correct and ESP connected"
self = Serial<id=0x786be969d990, open=False>(port='/dev/boards/esp_box_3', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
>           self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E           FileNotFoundError: [Errno 2] No such file or directory: '/dev/boards/esp_box_3'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:322: FileNotFoundError

During handling of the above exception, another exception occurred:

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x786be969d850>
port = '/dev/boards/esp_box_3', baud = 115200, trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
>               self._port.open()

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Serial<id=0x786be969d990, open=False>(port='/dev/boards/esp_box_3', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

    def open(self):
        """\
        Open port with current settings. This may throw a SerialException
        if the port cannot be opened."""
        if self._port is None:
            raise SerialException("Port must be configured before it can be used.")
        if self.is_open:
            raise SerialException("Port is already open.")
        self.fd = None
        # open
        try:
            self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
        except OSError as msg:
            self.fd = None
>           raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
E           serial.serialutil.SerialException: [Errno 2] could not open port /dev/boards/esp_box_3: [Errno 2] No such file or directory: '/dev/boards/esp_box_3'

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/serial/serialposix.py:325: SerialException

During handling of the above exception, another exception occurred:

args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_idf.app.IdfApp'>, 'serial': <...ded_idf.app.IdfApp object at 0x786be986ccb0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x786be986d7c0>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x786be977ce00>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:518: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/plugin.py:1151: in serial
    return serial_gn(**locals())
           ^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded/dut_factory.py:485: in serial_gn
    flash_serial = cls(**_drop_none_kwargs(kwargs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_idf/serial.py:42: in __init__
    super().__init__(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/pytest_embedded_serial_esp/serial.py:113: in __init__
    self.esp = esptool.get_default_connected_device(
/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/__init__.py:1261: in get_default_connected_device
    _esp = chip_class(each_port, initial_baud, trace)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <esptool.targets.esp32s3.ESP32S3ROM object at 0x786be969d850>
port = '/dev/boards/esp_box_3', baud = 115200, trace_enabled = False

    def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
        """Base constructor for ESPLoader bootloader interaction
    
        Don't call this constructor, either instantiate a specific
        ROM class directly, or use cmds.detect_chip(). You can use the with
        statement to ensure the serial port is closed when done.
    
        This base class has all of the instance methods for bootloader
        functionality supported across various chips & stub
        loaders. Subclasses replace the functions they don't support
        with ones which throw NotImplementedInROMError().
    
        """
        # True if esptool detects the ROM is in Secure Download Mode
        self.secure_download_mode = False
        # True if esptool detects conditions which require the stub to be disabled
        self.stub_is_disabled = False
    
        # Device-and-runtime-specific cache
        self.cache = {
            "flash_id": None,
            "uart_no": None,
            "usb_pid": None,
            "security_info": None,
        }
    
        if isinstance(port, str):
            try:
                self._port = serial.serial_for_url(
                    port, exclusive=True, do_not_open=True
                )
                if sys.platform == "win32":
                    # When opening a port on Windows,
                    # the RTS/DTR (active low) lines
                    # need to be set to False (pulled high)
                    # to avoid unwanted chip reset
                    self._port.rts = False
                    self._port.dtr = False
                self._port.open()
            except serial.serialutil.SerialException as e:
                port_issues = [
                    [  # does not exist error
                        re.compile(r"Errno 2|FileNotFoundError", re.IGNORECASE),
                        "Check if the port is correct and ESP connected",
                    ],
                    [  # busy port error
                        re.compile(r"Access is denied", re.IGNORECASE),
                        "Check if the port is not used by another task",
                    ],
                ]
                if sys.platform.startswith("linux"):
                    port_issues.append(
                        [  # permission denied error
                            re.compile(r"Permission denied", re.IGNORECASE),
                            ("Try to add user into dialout or uucp group."),
                        ],
                    )
    
                hint_msg = ""
                for port_issue in port_issues:
                    if port_issue[0].search(str(e)):
                        hint_msg = f"\nHint: {port_issue[1]}\n"
                        break
    
>               raise FatalError(
                    f"Could not open {port}, the port is busy or doesn't exist."
                    f"\n({e})\n"
                    f"{hint_msg}"
                )
E               esptool.util.FatalError: Could not open /dev/boards/esp_box_3, the port is busy or doesn't exist.
E               ([Errno 2] could not open port /dev/boards/esp_box_3: [Errno 2] No such file or directory: '/dev/boards/esp_box_3')
E               
E               Hint: Check if the port is correct and ESP connected

/opt/esp/python_env/idf5.5_py3.12_env/lib/python3.12/site-packages/esptool/loader.py:367: FatalError