cvfosammmm / Setzer

LaTeX editor written in Python with Gtk
https://www.cvfosammmm.org/setzer/
Other
394 stars 37 forks source link

Does not work on debian #266

Closed quuc closed 2 years ago

quuc commented 2 years ago

os: debian sid

sudo apt install setzer
python3 --version
# Python 3.10.4
setzer

log:

Traceback (most recent call last):
  File "/usr/bin/setzer", line 65, in do_startup
    self.main_window = view.MainWindow(self)
  File "/usr/lib/python3/dist-packages/setzer/workspace/workspace_viewgtk.py", line 91, in __init__
    self.build_log = build_log_view.BuildLogView()
  File "/usr/lib/python3/dist-packages/setzer/workspace/build_log/build_log_viewgtk.py", line 56, in __init__
    self.setup_icons()
  File "/usr/lib/python3/dist-packages/setzer/workspace/build_log/build_log_viewgtk.py", line 69, in setup_icons
    surface = Gdk.cairo_surface_create_from_pixbuf(pixbuf, self.get_scale_factor())
TypeError: Couldn't find foreign struct converter for 'cairo.Surface'
Traceback (most recent call last):
  File "/usr/bin/setzer", line 103, in do_activate
    self.activate()
  File "/usr/bin/setzer", line 107, in activate
    self.workspace = Workspace()
  File "/usr/lib/python3/dist-packages/setzer/workspace/workspace.py", line 71, in __init__
    self.sidebar = sidebar.Sidebar(self)
  File "/usr/lib/python3/dist-packages/setzer/workspace/sidebar/sidebar.py", line 31, in __init__
    self.view = ServiceLocator.get_main_window().sidebar
AttributeError: 'NoneType' object has no attribute 'sidebar'
cvfosammmm commented 2 years ago

@stephanlachnit ideas?

stephanlachnit commented 2 years ago

Hm, I'm not able to reproduce this. @cu233 can you give me the output of

apt list --installed python3-cairo python3-gi gir1.2-*
quuc commented 2 years ago
LANG=C apt list --installed python3-cairo python3-gi "gir1.2-*"

output:

Listing... Done
gir1.2-atk-1.0/unstable,now 2.38.0-1 arm64 [installed,automatic]
gir1.2-cheese-3.0/unstable,now 41.1-1 arm64 [installed,automatic]
gir1.2-clutter-1.0/unstable,now 1.26.4+dfsg-4 arm64 [installed,automatic]
gir1.2-cogl-1.0/unstable,now 1.22.8-3 arm64 [installed,automatic]
gir1.2-coglpango-1.0/unstable,now 1.22.8-3 arm64 [installed,automatic]
gir1.2-freedesktop/unstable,now 1.72.0-1+b1 arm64 [installed,automatic]
gir1.2-gdkpixbuf-2.0/unstable,now 2.42.8+dfsg-1 arm64 [installed,automatic]
gir1.2-glib-2.0/unstable,now 1.72.0-1+b1 arm64 [installed,automatic]
gir1.2-gspell-1/unstable,now 1.10.0-1+b1 arm64 [installed]
gir1.2-gst-plugins-base-1.0/unstable,now 1.20.2-2 arm64 [installed,automatic]
gir1.2-gstreamer-1.0/unstable,now 1.20.2-1 arm64 [installed,automatic]
gir1.2-gtk-3.0/unstable,now 3.24.33-2 arm64 [installed]
gir1.2-gtkclutter-1.0/unstable,now 1.8.4-4+b1 arm64 [installed,automatic]
gir1.2-gtksource-4/unstable,now 4.8.3-1 arm64 [installed]
gir1.2-handy-1/unstable,now 1.6.2-1 arm64 [installed,automatic]
gir1.2-harfbuzz-0.0/unstable,now 2.7.4-1+b1 arm64 [installed,automatic]
gir1.2-javascriptcoregtk-4.0/unstable,now 2.36.2-1 arm64 [installed,automatic]
gir1.2-json-1.0/unstable,now 1.6.6-1 arm64 [installed,automatic]
gir1.2-libxfce4ui-2.0/unstable,now 4.16.1-1 arm64 [installed,automatic]
gir1.2-libxfce4util-1.0/unstable,now 4.16.0-1 arm64 [installed,automatic]
gir1.2-notify-0.7/unstable,now 0.7.12-1 arm64 [installed,automatic]
gir1.2-packagekitglib-1.0/unstable,now 1.2.5-3 arm64 [installed,automatic]
gir1.2-pango-1.0/unstable,now 1.50.7+ds-1 arm64 [installed]
gir1.2-polkit-1.0/unstable,now 0.105-33 arm64 [installed,automatic]
gir1.2-poppler-0.18/unstable,now 22.02.0-3 arm64 [installed]
gir1.2-secret-1/unstable,now 0.20.5-2 arm64 [installed,automatic]
gir1.2-soup-2.4/unstable,now 2.74.2-3 arm64 [installed,automatic]
gir1.2-webkit2-4.0/unstable,now 2.36.2-1 arm64 [installed]
python3-cairo/unstable,now 1.20.1-3 arm64 [installed]
python3-gi/unstable,now 3.42.1-1 arm64 [installed]
stephanlachnit commented 2 years ago

@cu233 hm, can you try apt list --installed python3-gi-cairo and install it if it is not installed, maybe that's actually a dependency.

quuc commented 2 years ago

@stephanlachnit
Ohhhhh!!! It works. Thank you very much.

This is only because the maintainer of debian, who is responsible for packaging setzer, missed the dependency(python3-gi-cairo).

I think this bug should be reported to debian. But I don't know how to do that. Should I email Debian Science Maintainers directly?

Package: setzer
Version: 0.4.7-1
Installed-Size: 8679
Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Architecture: all
Depends: python3:any, python3-gi, gir1.2-gtk-3.0, gir1.2-gtksource-4, gir1.2-webkit2-4.0, gir1.2-gspell-1, gir1.2-pango-1.0, gir1.2-poppler-0.18, python3-pdfminer, python3-cairo, python3-pexpect
Recommends: texlive-latex-recommended, latexmk
Description: simple yet full-featured LaTeX editor
Description-md5: 8ae2196d648c27a42bc577db20553097
Homepage: https://www.cvfosammmm.org/setzer/
Section: tex
Priority: optional
Filename: pool/main/s/setzer/setzer_0.4.7-1_all.deb
Size: 3446740
quuc commented 2 years ago

@stephanlachnit 2022-05-30 01-34-22

Sir, I see that you are the maintainer of this package. This is amazing.

stephanlachnit commented 2 years ago

This is only because the maintainer of debian, who is responsible for packaging setzer, missed the dependency(python3-gi-cairo).

I'm actually the maintainer of Setzer in Debian :) You can report bugs with reportbug in Debian.

https://github.com/cvfosammmm/Setzer/blob/f6e32842586f4d1492e3d1562c34f8501e2d891c/README.md?plain=1#L24 should probably be updated to reflect that change.

quuc commented 2 years ago

@stephanlachnit Sir, I would like you to add the missing dependencies to Depends.

quuc commented 2 years ago

Or can I send a PR to salsa?

quuc commented 2 years ago

I think it would be better to install setzer directly via apt install setzer rather than manually installing the missing dependencies.

quuc commented 2 years ago

Runtime dependencies and build dependencies can be different. But this package is missing the runtime dependencies.

stephanlachnit commented 2 years ago

Or can I send a PR to salsa?

Sure, feel free to do so, else I'm going to do it.