aliva / gedit-markdownpreview

GNU General Public License v2.0
22 stars 3 forks source link

Blank preview panel with dark GTK theme #7

Closed yochananmarqos closed 5 years ago

yochananmarqos commented 5 years ago

Manjaro GNOME with the gnome-shell 3.30.2 Matcha Dark Sea GTK Theme

$ gedit

(gedit:25827): Gtk-WARNING **: 07:39:02.813: Theme parsing error: gtk.css:12:80: 'gtkalpha' is not a valid color name

(gedit:25827): Gtk-WARNING **: 07:39:02.813: Theme parsing error: gtk.css:15:80: 'gtkalpha' is not a valid color name
/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py:4: PyGIWarning: WebKit2 was imported without specifying a version first. Use gi.require_version('WebKit2', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gedit, GObject, Gtk, WebKit2, Gio
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 68, in menu_button_handler
    self.attach_to_view()
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 81, in attach_to_view
    self.toggle_preview(None, None, view)
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 92, in toggle_preview
    self.enable_preview(view)
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 113, in enable_preview
    self.buffer_changed(buffer, view)
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 161, in buffer_changed
    scroll_position=self.get_scroller_pos(view),
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 169, in get_scroller_pos
    value = adj.get_value() / value_limit
ZeroDivisionError: float division by zero
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 175, in buffer_scrolled
    scroll_position = self.get_scroller_pos(view)
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 169, in get_scroller_pos
    value = adj.get_value() / value_limit
ZeroDivisionError: float division by zero
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 175, in buffer_scrolled
    scroll_position = self.get_scroller_pos(view)
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 169, in get_scroller_pos
    value = adj.get_value() / value_limit
ZeroDivisionError: float division by zero

(WebKitWebProcess:25851): Gtk-WARNING **: 07:39:08.360: Theme parsing error: gtk.css:12:80: 'gtkalpha' is not a valid color name

(WebKitWebProcess:25851): Gtk-WARNING **: 07:39:08.360: Theme parsing error: gtk.css:15:80: 'gtkalpha' is not a valid color name
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 62, in do_deactivate
    self.disable_preview(view)
  File "/home/yochanan/.local/share/gedit/plugins/markdownpreview/markdownpreview.py", line 121, in disable_preview
    buffer.disconnect_by_func(self.buffer_changed)
TypeError: nothing connected to <bound method MarkdownPreviewWindowActivatable.buffer_changed of <markdownpreview.MarkdownPreviewWindowActivatable object at 0x7f123f3f1f78 (MarkdownPreviewWindowActivatable at 0x5630cda6cea0)>>

(gedit:25827): Gtk-CRITICAL **: 07:39:12.785: gtk_notebook_get_tab_label: assertion 'list != NULL' failed
aliva commented 5 years ago

It's not related to your theme, but there was two errors in your log I have fixed them, would you mind updating plugin and trying again?

yochananmarqos commented 5 years ago

Yep, that did the trick. Thank you!

yochananmarqos commented 4 years ago

Just in case someone has this issue, pep562 is also required:

Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/markdownpreview/markdownpreview.py", line 76, in menu_button_handler
    self.attach_to_view()
  File "/usr/lib/gedit/plugins/markdownpreview/markdownpreview.py", line 89, in attach_to_view
    self.toggle_preview(None, None, view)
  File "/usr/lib/gedit/plugins/markdownpreview/markdownpreview.py", line 100, in toggle_preview
    self.enable_preview(view)
  File "/usr/lib/gedit/plugins/markdownpreview/markdownpreview.py", line 121, in enable_preview
    self.buffer_changed(buffer, view)
  File "/usr/lib/gedit/plugins/markdownpreview/markdownpreview.py", line 155, in buffer_changed
    html = markdown(
  File "/usr/lib/python3.8/site-packages/markdown/core.py", line 390, in markdown
    md = Markdown(**kwargs)
  File "/usr/lib/python3.8/site-packages/markdown/core.py", line 99, in __init__
    self.registerExtensions(extensions=kwargs.get('extensions', []),
  File "/usr/lib/python3.8/site-packages/markdown/core.py", line 126, in registerExtensions
    ext = self.build_extension(ext, configs.get(ext, {}))
  File "/usr/lib/python3.8/site-packages/markdown/core.py", line 166, in build_extension
    module = importlib.import_module(ext_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/pymdownx/__init__.py", line 2, in <module>
    from pep562 import Pep562
ModuleNotFoundError: No module named 'pep562'
aliva commented 4 years ago

I think it would be better to open a new issue instead of commenting on the old ones :wink:

yochananmarqos commented 4 years ago

It was more to let you know more than anything. I've added the dependency to my AUR package

aliva commented 4 years ago

I think that's from the new update to enable more markdown extensions, thanks for noting that and updating :+1: