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

Registering a module within a Group: AttributeError: 'Group' object has no attribute 'default_hints' #854

Open
DavidAntliff opened this issue Jan 4, 2024 · 1 comment

Comments

@DavidAntliff
Copy link

DavidAntliff commented Jan 4, 2024

I'm looking to use the Group from #568 module with i3pystatus 5348220 (v3.35) from the head of the current branch:

from i3pystatus import Status
from i3pystatus.group import Group

group = Group()
group.register("clock")
status.register(group)

This results in the following traceback (I have a dedicated venv for i3pystatus):

Traceback (most recent call last):
  File "/home/david/.config/i3/i3pystatus.conf", line 55, in <module>
    group.register("clock")
  File "/home/david/.config/i3/i3pystatus-venv/lib/python3.10/site-packages/i3pystatus/group.py", line 49, in register
    module = Status.register(self, *args, **kwargs)
  File "/home/david/.config/i3/i3pystatus-venv/lib/python3.10/site-packages/i3pystatus/core/__init__.py", line 116, in register
    hints = self.default_hints.copy() if self.default_hints else {}
AttributeError: 'Group' object has no attribute 'default_hints'

I see this error with other modules like "network" as well as "clock".

@elig0n
Copy link
Contributor

elig0n commented Mar 20, 2024

I got it to work* after applying #862 and adding group.run() and status.run()

  • = when Status has no default_hints passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants