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

Several errors on Ubuntu 24.4 with gedit 46.2 #61

Open
FerdiScholten opened this issue May 22, 2024 · 0 comments
Open

Several errors on Ubuntu 24.4 with gedit 46.2 #61

FerdiScholten opened this issue May 22, 2024 · 0 comments

Comments

@FerdiScholten
Copy link

FerdiScholten commented May 22, 2024

First Ubuntu 24.4 does not have gir1.2-webkit2-4.0 it has been upgraded to gir1.2-webkit2-4.1 causing the plugin to fail to load:

** (gedit:135002): WARNING **: 07:46:22.540: Error importing plugin 'markdown_preview':
Traceback (most recent call last):
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/init.py", line 7, in
from .main_container import MdMainContainer
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/main_container.py", line 7, in
from .webview_manager import MdWebViewManager
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/webview_manager.py", line 5, in
gi.require_version('WebKit2', '4.0')
File "/usr/lib/python3/dist-packages/gi/init.py", line 125, in require_version
raise ValueError('Namespace %s not available for version %s' %
ValueError: Namespace WebKit2 not available for version 4.0

After changing the dependency to gir1.2-webkit2-4.1 the plugin loads but does not work, the panel remains empty and the following traceback is shown (probably same issue as #60):

Traceback (most recent call last):
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/init.py", line 93, in do_activate
self.preview.do_activate()
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/main_container.py", line 52, in do_activate
self.build_preview_ui()
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/main_container.py", line 207, in build_preview_ui
self.show_on_panel()
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/main_container.py", line 463, in show_on_panel
self.panel.add_titled(self.preview_bar, 'markdown_preview', _("Markdown Preview"))
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PanelContainer' object has no attribute 'add_titled'
Traceback (most recent call last):
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/init.py", line 101, in do_update_state
self.preview.do_update_state()
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/main_container.py", line 70, in do_update_state
elif self.panel.get_visible_child() != self.preview_bar:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PanelContainer' object has no attribute 'get_visible_child'
Traceback (most recent call last):
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/init.py", line 104, in do_deactivate
self.preview.do_deactivate()
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/main_container.py", line 86, in do_deactivate
self._delete_temp_file()
File "/usr/lib/x86_64-linux-gnu/gedit/plugins/markdown_preview/main_container.py", line 91, in _delete_temp_file
if self.temp_file_md.query_exists():
^^^^^^^^^^^^^^^^^
AttributeError: 'MdMainContainer' object has no attribute 'temp_file_md'

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

1 participant