Giter Club home page Giter Club logo

Comments (3)

sigwinch28 avatar sigwinch28 commented on June 3, 2024 2

I have just encountered this issue. Installing python3-gi-cairo fixed it.

[joe@ryuko ~]$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux testing (buster)
Release:        testing
Codename:       buster
[joe@ryuko ~]$ pip3 install --user pympress
Collecting pympress
  Using cached https://files.pythonhosted.org/packages/b0/5c/70c9c50529d466d70b8770f586f544de43189921b13742e4808f90fc5eb5/pympress-1.2.0-py2.py3-none-any.whl
Collecting python-vlc (from pympress)
Installing collected packages: python-vlc, pympress
Successfully installed pympress-1.2.0 python-vlc-3.0.102
[joe@ryuko ~]$ apt search python3-cairo
Sorting... Done
Full Text Search... Done
python3-cairo/testing,now 1.16.2-1+b1 amd64 [installed]
  Python3 bindings for the Cairo vector graphics library
[joe@ryuko ~]$ pympress3

(pympress3:18496): Gtk-WARNING **: 23:02:51.830: Theme parsing error: gtk.css:127:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(pympress3:18496): Gtk-WARNING **: 23:02:51.830: Theme parsing error: gtk.css:128:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

(pympress3:18496): Gtk-WARNING **: 23:02:51.830: Theme parsing error: gtk.css:132:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
Traceback (most recent call last):
  File "/home/joe/.local/lib/python3.6/site-packages/pympress/surfacecache.py", line 298, in renderer
    surface = self.surface_factory[widget_name](cairo.CONTENT_COLOR, ww, wh)
  File "/home/joe/.local/lib/python3.6/site-packages/pympress/surfacecache.py", line 128, in <lambda>
    self.surface_factory[widget_name] = lambda c, w, h: widget.get_window().create_similar_surface(c, w, h)
TypeError: Couldn't find foreign struct converter for 'cairo.Surface'
[joe@ryuko ~]$ sudo apt install python3-gi-cairo
[sudo] password for joe: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  python3-gi-cairo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.5 kB of archives.
After this operation, 76.8 kB of additional disk space will be used.
Get:1 http://ftp.uk.debian.org/debian testing/main amd64 python3-gi-cairo amd64 3.30.1-1 [24.5 kB]
Fetched 24.5 kB in 0s (87.6 kB/s)           
Selecting previously unselected package python3-gi-cairo.
(Reading database ... 495141 files and directories currently installed.)
Preparing to unpack .../python3-gi-cairo_3.30.1-1_amd64.deb ...
Unpacking python3-gi-cairo (3.30.1-1) ...
Setting up python3-gi-cairo (3.30.1-1) ...

from pympress.

Cimbali avatar Cimbali commented on June 3, 2024 1

Hi @sigwinch28, thanks for the feedback I'll update the readme.

from pympress.

Cimbali avatar Cimbali commented on June 3, 2024

That's sort of strange. We use the python-cairo bindings, but not through gobject introspection (gi). I suspect python-cairo is a dependency for python-gi-cairo, so you might have installed both at once.

Did you copy/paste the command line from the README? I see you're using Python 2.7 and the command line given is installing prerequesites for python 3 (i.e. python3-cairo instead of python-cairo).

You could grep through your apt logs to find out whether you just installed python-cairo or just python-gi-cairo. That would confirm whether a dependency is really missing or not.

from pympress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.