gedit-plugin-markdown_preview icon indicating copy to clipboard operation
gedit-plugin-markdown_preview copied to clipboard

Fails to load; gedit 44.2; Manjaro 22.1.0

Open sevaseva opened this issue 2 years ago • 5 comments

Cloned revision cc711c00a4ed11b89b2ecc604e4a7aa9c163adb7 Ran ./install.sh as a non-root Enabled the plugin in gedit Closed all gedit instances Started it again (not sure if any of the printed WARNINGs are relevant):

$ gedit foo.md

** (gedit:43458): WARNING **: 23:00:54.120: Error initializing Python Plugin Loader: PyGObject initialization failed
ImportError: could not import gobject (error was: ModuleNotFoundError("No module named 'gi'"))

** (gedit:43458): WARNING **: 23:00:54.120: Please check the installation of all the Python related packages required by libpeas and try again

(gedit:43458): libpeas-WARNING **: 23:00:54.120: Loader 'python3' is not a valid PeasPluginLoader instance

** (gedit:43458): WARNING **: 23:00:54.216: Error loading plugin: libaspell.so.15: cannot open shared object file: No such file or directory


** (gedit:43458): WARNING **: 23:00:54.216: Error loading plugin: libhspell.so.0: cannot open shared object file: No such file or directory


** (gedit:43458): WARNING **: 23:00:54.216: Error loading plugin: libnuspell.so.5: cannot open shared object file: No such file or directory


** (gedit:43458): WARNING **: 23:00:54.216: Error loading plugin: libvoikko.so.1: cannot open shared object file: No such file or directory


** (gedit:43458): WARNING **: 23:00:54.216: Error loading plugin: libaspell.so.15: cannot open shared object file: No such file or directory


** (gedit:43458): WARNING **: 23:00:54.216: Error loading plugin: libhspell.so.0: cannot open shared object file: No such file or directory


** (gedit:43458): WARNING **: 23:00:54.216: Error loading plugin: libnuspell.so.5: cannot open shared object file: No such file or directory


** (gedit:43458): WARNING **: 23:00:54.216: Error loading plugin: libvoikko.so.1: cannot open shared object file: No such file or directory

image

Let me know if I can help debug, e.g. give you more information about the system or try a fix, etc.

Thanks!

sevaseva avatar Apr 27 '23 06:04 sevaseva

On the same system, with nothing changed, when starting gedit using gnome app launcher (i.e. "the normal way", not from the command line) the plugin loads fine, but renders no Markdown:

image

sevaseva avatar Apr 27 '23 06:04 sevaseva

Same issue on Ubuntu 23.04 with gedit 44.2 The plugin loads in gedit and can be configured but does not render any output (blank window) when starting gedit in a terminal I get this:

Traceback (most recent call last):
  File "/home/ferdi/.local/share/gedit/plugins/markdown_preview/main_container.py", line 356, in on_file_changed
    self.file_format = self.recognize_format()
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ferdi/.local/share/gedit/plugins/markdown_preview/main_container.py", line 364, in recognize_format
    name = doc.get_short_name_for_display()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Document' object has no attribute 'get_short_name_for_display'

FerdiScholten avatar Apr 27 '23 07:04 FerdiScholten

So above is indeed the root cause why this plugin no longer works in gedit 44.2, found this on https://gitlab.gnome.org/GNOME/gedit/-/blob/master/docs/reference/api-breaks.xml

The gedit_document_get_short_name_for_display() function has been removed, use tepl_file_get_short_name() instead.

FerdiScholten avatar Apr 27 '23 07:04 FerdiScholten

Your issues are different ones

@sevaseva i believe you're missing python3-gi, which on manjaro is probably named python-gobject. If it is already installed, then it's a problem of how python is set up: i forgot how it worked though. A quick google search tells me it's a common issue among Arch-based distros users

@FerdiScholten the stable version isn't compatible with gedit 44 yet, the issue you were looking for is #48 or #46. You can either use the unstable "master" branch like @sevaseva did (i don't recommend it because it's full of unfinished buggy code), or you can wait a few days until i test and publish a proper release

maoschanz avatar Apr 27 '23 11:04 maoschanz

Can we expect a proper release soon?

dtrunk90 avatar Aug 15 '23 19:08 dtrunk90

Can we expect a proper release soon?

done! i hope it works...

maoschanz avatar Feb 25 '24 02:02 maoschanz

Yes, it does. Thank you!

dtrunk90 avatar May 21 '24 13:05 dtrunk90