falkTX / Cadence

Collection of tools useful for audio production
GNU General Public License v2.0
369 stars 80 forks source link

TypeError: setEnabled(self, bool): argument 1 has unexpected type 'NoneType' #334

Open jeberger opened 2 years ago

jeberger commented 2 years ago

When attempting to run Catia on Pipewire instead of Jack, Catia crashes with:

Traceback (most recent call last):
  File "/usr/share/cadence/src/catia.py", line 1428, in <module>
    gui = CatiaMainW()
  File "/usr/share/cadence/src/catia.py", line 169, in __init__
    if self.jackStarted():
  File "/usr/share/cadence/src/catia.py", line 919, in jackStarted
    self.menuJackServer(True)
  File "/usr/share/cadence/src/catia.py", line 998, in menuJackServer
    self.menuA2JBridge(False)
  File "/usr/share/cadence/src/catia.py", line 1012, in menuA2JBridge
    self.ui.act_tools_a2j_export_hw.setEnabled(gDBus.a2j and not gDBus.a2j.is_started())
TypeError: setEnabled(self, bool): argument 1 has unexpected type 'NoneType'

This can be fixed by replacing the offending line with:

self.ui.act_tools_a2j_export_hw.setEnabled(bool(gDBus.a2j) and not gDBus.a2j.is_started())
DDzwiedziu commented 2 years ago

Same here. With the addition that qjackctl works normally.

libspa-0.2-jack 0.3.24-3 pipewire 0.3.24-3

EDIT: I may have a problem with pipewire's JACK interface, as any other JACK apps don't work.

livmackintosh commented 2 years ago

I can confirm that I also have the same problem and that your solution fixes it.

Thanks, Olivia

nyanpasu64 commented 2 years ago

I also get this error on an Arch Linux machine with PipeWire installed but disabled in systemctl --user, and the real jack2 running from qjackctl.

Is the bug that Catia crashes (and Cadence has a non-fatal exception) with a2jmidid not installed?

Traceback (most recent call last):
  File "/usr/share/cadence/src/cadence.py", line 1779, in slot_A2JBridgeExportHW
    a2jWasStarted = bool(gDBus.a2j.is_started())
AttributeError: 'NoneType' object has no attribute 'is_started'