Skip to content

can.detect_available_configs() returns neousys interface when not connected #1738

Closed
@pullthebox

Description

@pullthebox

Describe the bug

can.detect_available_configs() returns [{'interface': 'virtual', 'channel': 'channel-9336'}, {'interface': 'neousys', 'channel': 0}] when no interface is connected.

To Reproduce

import can
can.detect_available_configs()

Expected behavior

I think only the virtual interface should be shown, i.e.: [{'interface': 'virtual', 'channel': 'channel-9336'}]

Additional context

OS and version: Windows 11
Python version: 3.11.7
python-can version: 4.3.1
python-can interface/s (if applicable): N/A

Traceback and logs
Kvaser canlib is unavailable.
socket.CMSG_SPACE not available on this platform
failed to fetch opened can devices from ip link
Traceback (most recent call last):
  File "C:\Users\Socrates.Vlassis\Projects\akrocansim\venv311\Lib\site-packages\can\interfaces\socketcan\utils.py", line 52, in find_available_interfaces
    output_str = subprocess.check_output(command, text=True)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Python311\Lib\subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Python311\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Python311\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
You won't be able to use the serial can backend without the serial module installed!
uptime library not available, timestamps are relative to boot time and not to Epoch UTC
Cannot load IXXAT vcinpl library: Could not find module 'vcinpl.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Cannot load IXXAT vcinpl library: Could not find module 'vcinpl2.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Failed to load NI-CAN driver: Could not find module 'nican' (or one of its dependencies). Try using the full path with constructor syntax.
Failed to load IS-CAN driver: Could not find module 'iscandrv' (or one of its dependencies). Try using the full path with constructor syntax.
You won't be able to use the ICS neoVI can backend without the python-ics module installed!: No module named 'ics'
Using ICS neoVI can backend without the filelock module installed may cause some issues!: No module named 'filelock'
Could not import vxlapi: Could not find module 'vxlapi64' (or one of its dependencies). Try using the full path with constructor syntax.
You won't be able to use the slcan can backend without the serial module installed!
You won't be able to use the Robotell can backend without the serial module installed!
Cannot load SYSTEC ucan library: Could not find module 'usbcan64.dll' (or one of its dependencies). Try using the full path with constructor syntax..
The SYSTEC ucan library has not been initialized.
You won't be able to use the serial can backend without the serial module installed!
The CANtact module is not installed. Install it using `pip install cantact`
Could not import nixnet: No module named 'nixnet'
[{'interface': 'virtual', 'channel': 'channel-9336'}, {'interface': 'neousys', 'channel': 0}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions