Error enabling syntax completer if snippets is not enabled

Bug #430452 reported by James Tatum
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gedit Developer Plugins
Fix Released
Low
Curtis Hovey

Bug Description

I installed via ./configure;make;make install which after some loading of build-deps and deps, went OK. I was able to get all plugins to activate except GDP Syntax Completer. When checking that, I get the following exception:

Traceback (most recent call last):
  File "/home/jtatum/.gnome2/gedit/plugins/gdpsyntaxcompleter.py", line 15, in <module>
    from gdp.syntaxcompleter import SyntaxController
  File "/home/jtatum/.gnome2/gedit/plugins/gdp/syntaxcompleter.py", line 28, in <module>
    from snippets.SnippetComplete import SnippetComplete, CompleteModel
ImportError: No module named snippets.SnippetComplete

I do have a /usr/lib/gedit-2/plugins/snippets/SnippetComplete.py.

gedit 2.27.6, gedit-developer-plugins-2.26.3

Revision history for this message
James Tatum (jtatum) wrote :

This is probably obvious if you're not a noob like me, but you actually need to enable the snippets plugin in gedit or you will get this error.

Revision history for this message
Curtis Hovey (sinzui) wrote :

No, this is not obvious. I have always had Snippets enabled, but I assumed by the way I subclassed the code, it did not need to be enabled.

In hindsight, Gedit configures the python path using the enabled plugins. So when gdpsyntaxxompleter is selected, it needs to enable the Snippet plugin, or modify the python path itself.

Changed in gdp:
status: New → Triaged
importance: Undecided → Low
summary: - Error enabling syntax completer - exception importing
- snippets.SnippetComplete
+ Error enabling syntax completer if snippets is not enabled
Revision history for this message
Curtis Hovey (sinzui) wrote :

While it is possible to force the snippet module into the python path, that approach undermines the gedit's control of the python path. I chose to show a message telling the user that he must enable the snippets plugin first.

Changed in gdp:
assignee: nobody → Curtis Hovey (sinzui)
milestone: none → 0.2
status: Triaged → Fix Committed
Revision history for this message
Curtis Hovey (sinzui) wrote : Bug 430452 Fix released

Fixed released in gdp 0.2.

Changed in gdp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.