Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emit more useful message on dbus exception #12

Open
Stemby opened this issue Nov 22, 2020 · 5 comments
Open

emit more useful message on dbus exception #12

Stemby opened this issue Nov 22, 2020 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Stemby
Copy link

Stemby commented Nov 22, 2020

Hi,
I'm just forwarding this bug report issued via Debian BTS.

Best regards,
Carlo

@Stemby
Copy link
Author

Stemby commented Nov 23, 2020

OK, I found the problem: JACK has to be running before launching $ a2j_control --start.

I think a less cryptic message would be fine.

Best regards,
Carlo

@dvzrv
Copy link
Collaborator

dvzrv commented Nov 23, 2020

We can certainly look into excepting the dbus.exceptions.DBusException and emitting a more useful message.
Unfortunately the exception itself does not necessarily tell us "why" dbus failed.

Pull requests welcome! :)

@dvzrv dvzrv added enhancement New feature or request good first issue Good for newcomers labels Nov 23, 2020
@dvzrv dvzrv changed the title a2j_control doesn't work emit more useful message on dbus exception Nov 23, 2020
@M1ndo
Copy link

M1ndo commented Nov 29, 2020

I'm having the same issue on arch linux , and the problem is not jack has to be running before executing a2j_control --start i have it already running and i'm still getting this issue.

@dvzrv
Copy link
Collaborator

dvzrv commented Nov 29, 2020

Could you provide the output of a2j_control --status and whether you have tried to start the hardware export while a2j_control states its bridging to be enabled?

I can not reproduce an issue with a2j_control --start but a DbusException is raised when trying to enable the hardware while the bridge is started:

$ a2j_control --ehw
--- enable export of hardware ports
Traceback (most recent call last):
  File "/usr/bin/a2j_control", line 203, in <module>
    A2JControl()
  File "/usr/bin/a2j_control", line 199, in __init__
    self.call_controller_function()
  File "/usr/bin/a2j_control", line 186, in call_controller_function
    self.controller_export_hardware_ports(True)
  File "/usr/bin/a2j_control", line 151, in controller_export_hardware_ports
    self.controller_interface.set_hw_export(True)
  File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3.8/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.gna.home.a2jmidid.error.bridge_running: Bridge is started

@M1ndo
Copy link

M1ndo commented Nov 30, 2020

i'm not sure what's going here, but it's seems not running a2jmidid -e starts the bridge with no errors and works as expected.
while a2jmidid -e is running ,

a2j_control --start
--- start
Traceback (most recent call last):
  File "/usr/bin/a2j_control", line 203, in <module>
    A2JControl()
  File "/usr/bin/a2j_control", line 199, in __init__
    self.call_controller_function()
  File "/usr/bin/a2j_control", line 166, in call_controller_function
    self.controller_start()
  File "/usr/bin/a2j_control", line 94, in controller_start
    self.controller_interface.start()
  File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3.8/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.gna.home.a2jmidid.error.generic: a2j_start() failed.
a2j_control --status
--- status
Bridging disabled
Hardware exported
Allowing unique port names
a2j_control --ehw
--- enable export of hardware ports

without starting a2jmidid -e

a2j_control --start
--- start
~|⇒ a2j_control --status
--- status
Bridging enabled
Hardware exported
Allowing unique port names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants