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

AttributeError: 'NoneType' object has no attribute 'status' #4

Open
worldpe opened this issue Nov 30, 2023 · 0 comments · May be fixed by #5
Open

AttributeError: 'NoneType' object has no attribute 'status' #4

worldpe opened this issue Nov 30, 2023 · 0 comments · May be fixed by #5

Comments

@worldpe
Copy link

worldpe commented Nov 30, 2023

waybar-media.py status outputs

  File "/run/media/moon/storage/Scripts/waybar-media.py", line 275, in <module>
    main()
  File "/run/media/moon/storage/Scripts/waybar-media.py", line 252, in main
    with MediaWatcher(bus, do_print_status=(arg == 'status')) as media_watcher:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/moon/storage/Scripts/waybar-media.py", line 104, in __init__
    self.status_builder.print_status()
  File "/run/media/moon/storage/Scripts/waybar-media.py", line 233, in print_status
    print(self.build_status())
          ^^^^^^^^^^^^^^^^^^^
  File "/run/media/moon/storage/Scripts/waybar-media.py", line 229, in build_status
    {'tooltip': self._build_tooltip(), 'text': self._build_text(max_width=80), 'class': self._build_classes()}
                ^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/moon/storage/Scripts/waybar-media.py", line 173, in _build_tooltip
    if player.status in ['playing', 'paused']:
       ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'status'```

Someone else reported having this error message with no media playing, but I do have media playing and I have tried to run this after pausing and everything.
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

Successfully merging a pull request may close this issue.

1 participant