deter0/xborder

Launch failure: KeyError: 'could not find foreign type Region'

serif opened this issue · 7 comments

serif commented

xborders: 3.2 (pulled today, 2022-10-05)
OS: Debian Sid (unstable) 5.19.11-1
Host: 80S6 Lenovo N22 (amd64)
Python: 3.10.7
WM: i3-gaps 4.21-18-gcee84a56

xborders isn't able to start:

❯ ./xborders
/home/a/git/xborder/./xborders:280: DeprecationWarning: Gtk.Window.set_wmclass is deprecated
  self.set_wmclass("xborders", "xborder")
Traceback (most recent call last):
  File "/home/a/git/xborder/./xborders", line 449, in <module>
    main()
  File "/home/a/git/xborder/./xborders", line 443, in main
    Highlight(screen_width, screen_height)
  File "/home/a/git/xborder/./xborders", line 298, in __init__
    self.input_shape_combine_region(cairo.Region())
KeyError: 'could not find foreign type Region'
serif commented

To be clear, I did run pip install -r requirements.txt, and re-running gives me a stack of Requirement already satisfied: [...] messages.

Do you have cairo installed on your system?

Also can you send the output of

pip list | grep 'pycairo'
serif commented
❯ pip3 list | grep cairo
pycairo             1.21.0
❯ apt list --installed libcairo2
Listing... Done
libcairo2/unstable,now 1.16.0-6 amd64 [installed]
serif commented

Oh FYI, I've accidentally mixed pip and pip3 here because of old habits, but they're the same thing on this system.

❯ pip --version
pip 22.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

Getting the same issue running the latest version of regolith, cairo is installed both through pip and through apt

edit: more system info
OS: Ubuntu 22.10
Python: 3.10.7
WM: i3 gaps 4.21

resolved this by installing the package python3-gi-cairo through apt