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

Plugin.available is interpreted as a method reference instead of property access #261

Closed
mgsloan opened this issue Jan 13, 2024 · 1 comment · Fixed by #262
Closed

Plugin.available is interpreted as a method reference instead of property access #261

mgsloan opened this issue Jan 13, 2024 · 1 comment · Fixed by #262
Labels
bug Something isn't working

Comments

@mgsloan
Copy link

mgsloan commented Jan 13, 2024

Describe the bug

Just running yin-yang works. I'm using xmonad as my window manager, so XDG_CURRENT_DESKTOP is not set and so plugins specific to desktop environments do not work. I tried XDG_CURRENT_DESKTOP=gnome yin-yang but then get:

Plugin Colors has no support for your desktop environment yet!
Plugin Icons has no support for your desktop environment yet!
No such schema “org.gnome.shell.extensions.user-theme”
Error while loading translation. Using default language.
No such schema “org.gnome.shell.extensions.user-theme”
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/opt/yin-yang/yin_yang/__main__.py", line 134, in <module>
    window = main_window_connector.MainWindow()
  File "/opt/yin-yang/yin_yang/ui/main_window_connector.py", line 55, in __init__
    self.load()
  File "/opt/yin-yang/yin_yang/ui/main_window_connector.py", line 91, in load
    self.load_plugins()
  File "/opt/yin-yang/yin_yang/ui/main_window_connector.py", line 126, in load_plugins
    widget = plugin.get_widget(self.ui.plugins_scroll_content)
  File "/opt/yin-yang/yin_yang/plugins/_plugin.py", line 71, in get_widget
    widget.setVisible(self.available)
TypeError: 'PySide6.QtWidgets.QWidget.setVisible' called with wrong argument types:
  PySide6.QtWidgets.QWidget.setVisible(method)
Supported signatures:
  PySide6.QtWidgets.QWidget.setVisible(bool)

So, it seems like the Plugin.available property is being interpreted as a method reference instead of a property access. Totally mysterious to me why this would happen.

Affected versions

Yin-Yang head de1f3eb

@mgsloan mgsloan added the bug Something isn't working label Jan 13, 2024
@l0drex
Copy link
Collaborator

l0drex commented Jan 14, 2024

I forgot to add @property to the gnome implementation, whoops

@l0drex l0drex linked a pull request Jan 17, 2024 that will close this issue
@l0drex l0drex closed this as completed in d0af7cd Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants