Skip to content

RuntimeError calling get_ports() #135

Description

@Houston4444

Hi. I meet a RuntimeError with the get_clients() Client method. Obviously it is not systematic at all and I was trying to make my program crash or find any other errors, stopping and starting JACK many times (when stopped, my client tries to connect to JACK every 500ms, on success it parse ports and connections).

File "/home/houston4444/RaySession/src/patchbay_daemon/patchbay_daemon.py", line 685, in get_all_ports_and_connections
    port_name = port.name
                ^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jack.py", line 1841, in name
    return _decode(_lib.jack_port_name(self._ptr))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jack.py", line 82, in _decode
    return _ffi.string(cdata).decode()
           ^^^^^^^^^^^^^^^^^^
RuntimeError: cannot use string() on <cdata 'char *' NULL>

Here is the part of my code where it happens:

#get all currents Jack ports and connections
for port in self.client.get_ports():
    flags = jack._lib.jack_port_flags(port._ptr)
    port_name = port.name
    port_uuid = port.uuid

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions