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

get_primary_monitor() returns None #285

Closed
Triggaaaaa opened this issue Mar 29, 2023 · 2 comments
Closed

get_primary_monitor() returns None #285

Triggaaaaa opened this issue Mar 29, 2023 · 2 comments

Comments

@Triggaaaaa
Copy link

Describe the bug
Upon last update to version 1.8.0 pympress does not start anymore.

To Reproduce
Launch pympress.

Expected behavior
Normal startup as before.

Environment

  • OS: Arch Linux
  • Wayland
  • KDE
  • Python version: 3.10.10
  • Pympress version: 1.8.0
  • Gtk 3.24.37
  • GLib 2.76.1
  • Poppler 23.03.0 cairo
  • Cairo 1.17.8
  • pycairo 1.23.0
  • Installation method: Arch Linux AUR, which builds from source

Debug information

  • What is reported in pympress.log?
INFO:pympress.app:Pympress: 1.8.0 ; Python: 3.10.10 ; OS: Linux 6.2.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 22 Mar 2023 22:52:35 +0000 ; Gtk 3.24.37 ; GLib 2.76.1 ; Poppler 23.03.0 cairo ; Cairo 1.17.8 , pycairo 1.23.0
INFO:pympress.extras:Media support: GdkPixbuf gif player, GStreamer 1.22.1, VLC not available
CRITICAL:pympress.__main__:Uncaught exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pympress/app.py", line 227, in do_open
    self.do_activate(timestamp=GLib.get_current_time())
  File "/usr/lib/python3.10/site-packages/pympress/app.py", line 157, in do_activate
    self.gui = ui.UI(self, self.config)
  File "/usr/lib/python3.10/site-packages/pympress/ui.py", line 317, in __init__
    self.setup_screens(screen, 'at startup')
  File "/usr/lib/python3.10/site-packages/pympress/ui.py", line 484, in setup_screens
    c_monitor, p_monitor, primary, non_primary = ScreenArea.lookup_monitors(display, self.c_win, self.p_win)
  File "/usr/lib/python3.10/site-packages/pympress/ui.py", line 2022, in lookup_monitors
    prim = ScreenArea(display.get_primary_monitor().get_geometry())
AttributeError: 'NoneType' object has no attribute 'get_geometry'
  • Does the problem still happen if you remove your config file?
    Yes.

Additional context
Changing get_primary_monitor() to e.g. get_monitor(0) is a workaround.

@Cimbali
Copy link
Owner

Cimbali commented Mar 29, 2023

Thanks for reporting! This is he same issue as #283, and he fix is already released in v1.8.1.

@Cimbali Cimbali closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2023
@Triggaaaaa
Copy link
Author

Thank you!
Sorry for missing #283

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