py3status: Bluetooth module fails on wake up from suspend

Describe the bug Bluetooth module fails on wakeup from suspend

Your py3status version py3status version 3.54 (python 3.11.5) on i3

To Reproduce

  1. Add the bluetooth module to py3status
  2. run py3status -d -s --log-file log - BT module works fine
  3. suspend your PC
  4. wake up your PC
  5. see the output of the running command - bluetooth module doesn’t work

Expected behavior Bluetooth module works after the wakeup.

Additional context This is the error message from the module

2023-10-17 17:50:47 WARNING Instance `bluetooth`, user method `bluetooth` failed.
2023-10-17 17:50:47 INFO Traceback
Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.5206 was not provided by any .service files (2)
  File "/usr/lib/python3.11/site-packages/py3status/module.py", line 943, in run
    response = method()
               ^^^^^^^^
  File "/usr/lib/python3.11/site-packages/py3status/modules/bluetooth.py", line 146, in bluetooth
    bluez_data = self._get_bluez_data()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/py3status/modules/bluetooth.py", line 124, in _get_bluez_data
    objects = self.bluez_manager.GetManagedObjects()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/gi/overrides/Gio.py", line 349, in __call__
    result = self.dbus_proxy.call_sync(self.method_name, arg_variant,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I suppose the problem is that bluetooth info is not available right away, so maybe the bluetooth module could catch this error and try again later.

I am using Arch Linux.

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

Thank you.