jpfleury / gedit-markdown

Support for Markdown language in gedit
GNU General Public License v3.0
131 stars 29 forks source link

Just can't enable extensions #17

Open kdidenko opened 6 years ago

kdidenko commented 6 years ago

After installing this extension according to the README.md manual, as soon as I'm trying to enable it through Gedit's GUI (e.g.: edit > preferences > "Markdown Preview") it throws me an error to console:

(gedit:17417): libpeas-WARNING **: Error importing plugin 'markdown-preview':
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 890, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/user/.local/share/gedit/plugins/markdown-preview/__init__.py", line 21, in <module>
    from gi.repository import Gdk, Gtk, Gedit, GObject, WebKit
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 127, in find_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name WebKit, introspection typelib not found

(gedit:17417): libpeas-WARNING **: Error loading plugin 'markdown-preview'
 sys:1: Warning: invalid cast from 'GeditPreferencesDialog' to 'GeditWindow'

System specs: user@ubuntu:~$ **uname -a** Linux ubuntu 4.4.0-109-generic #132-Ubuntu SMP Tue Jan 9 19:52:39 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

user@ubuntu:~$ **lsb_release -a**
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:   xenial

Gedit: v.3.18.3

kdidenko commented 6 years ago

P.S.: My systems default:

user@ubuntu:~$ python --version
Python 2.7.12
ionik-dev commented 5 years ago

Confirm - got the same error on Ubuntu 18.04, gedit 3.28.1

(gedit:14763): libpeas-WARNING **: 15:00:46.429: Error importing plugin 'markdown-preview':
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 888, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/ionik/.local/share/gedit/plugins/markdown-preview/__init__.py", line 21, in <module>
    from gi.repository import Gdk, Gtk, Gedit, GObject, WebKit
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 127, in find_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name WebKit, introspection typelib not found

(gedit:14763): libpeas-WARNING **: 15:00:46.429: Error loading plugin 'markdown-preview'
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic
darkdragon-001 commented 4 years ago

This issue is fixed in my fork: https://github.com/darkdragon-001/gedit-markdown/

Please test the latest release. Pull requests are always welcome!

matthieuheitz commented 3 years ago

I have the same error with Ubuntu 16.04, gedit 3.28.3 and gir1.2-webkit2-4.0. I tried with @darkdragon-001 's repo, but it doesn't work either. I get the error:

(gedit:10427): libpeas-WARNING **: Error importing plugin 'markdown-preview':
Traceback (most recent call last):
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/matthieu/.local/share/gedit/plugins/markdown-preview/__init__.py", line 26, in <module>
    import markdown
ImportError: No module named 'markdown'
darkdragon-001 commented 3 years ago

@matthieuheitz Check the Requirements. In your case installing via apt-get install python3-markdown should do the trick.