gedit: Could not find loader 'python' for plugin

Bug #1242126 reported by Richard Eszes
74
This bug affects 15 people
Affects Status Importance Assigned to Milestone
gedit-source-code-browser-plugin (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

When I try to enable some plugin in gedit (3.8.3-0ubuntu3), I can error message such this:

(gedit:11688): libpeas-WARNING **: Could not find loader 'python' for plugin 'sourcecodebrowser'

Operation system: Ubuntu 13.10 64 bit

Tags: patch
affects: indicator-sound (Ubuntu) → gedit (Ubuntu)
Changed in gedit (Ubuntu):
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gedit (Ubuntu):
status: New → Confirmed
Revision history for this message
rg (rob-themayfire) wrote :

Same here, sourcecodebrowser plugin worked on 13.04, no longer works on 13.10. When I start gedit from cmdline I get the same error as OP upon attempting to enable the plugin. Seems to be a similar issue with many gedit plugins, but apparently all with different solutions. Many have recommended editing the .plugin file and changing Loader=python to Loader=python3, which seems to get us past the "could not find loader" problem, but still doesn't work:

Traceback (most recent call last):
  File "/home/rob/.local/share/gedit/plugins/sourcecodebrowser/__init__.py", line 1, in <module>
    import plugin
ImportError: No module named 'plugin'

Also just for the whynot I tried python2 and got "Could not find loader 'python2' for plugin 'sourcecodebrowser'"

I do have all 3 pythons...

$ which python
/usr/bin/python
$ which python2
/usr/bin/python2
$ which python3
/usr/bin/python3

Revision history for this message
Sebastien Bacher (seb128) wrote :

Do you get the issue if you install gedit-source-code-browser-plugin rather than using your local copy?

Changed in gedit (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
rg (rob-themayfire) wrote :

Yes, same issue after installing via gedit-source-code-browser-plugin (and removing ~/.local/share/gedit/plugins/sourcecodebrowser*). Upon attempting to enable the plugin I get the same error reported by OP. Changing the Loader value in /usr/lib/gedit/plugins/sourcecodebrowser.plugin has all the same effects as I described above.

Revision history for this message
Sebastien Bacher (seb128) wrote :

not sure what's the issue there, could be a libpeas bug ... I can't confirm though, it works here

Changed in gedit (Ubuntu):
status: Incomplete → New
Revision history for this message
Huan Zhang (victzhang) wrote :

My patch should solve this problem. Please test it.

Thanks,
Huan

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gedit (Ubuntu):
status: New → Confirmed
Revision history for this message
Huan Zhang (victzhang) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for gedit plugin "sourcecodebrowser", tested on gedit 3.8.3 and Python 3.3.2" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
rg (rob-themayfire) wrote :

SUCCESS! Applying victzhang's patch solves the problem and the plugin is now working again.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you explain the changes you did and send those upstream as well?

Revision history for this message
Huan Zhang (victzhang) wrote :

This plugin is written for Python 2, but since gedit 3.8, only Python 3 plugins are supported. So some small changes are required.

Send the patch to https://github.com/Quixotix/gedit-source-code-browser/issues/25, but I am not sure if it will be updated soon since there has not been any no active developments in this repository for two years.

Revision history for this message
rg (rob-themayfire) wrote :

Forked gedit-source-code-browser, committed patch, submitted pull request. FWIW.

Changed in gedit (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
rg (rob-themayfire) wrote :

I'm new around here, but I'm not sure Fix Released is the proper status yet for this bug. I am not the maintainer of this plugin, I've only applied the patch on a fork and submitted a pull request to the maintainer (Quixotix), who I assume will need to merge the change before this fix is "released"..?

Revision history for this message
Sebastien Bacher (seb128) wrote :

reassigning to gedit-source-code-browser

Changed in gedit (Ubuntu):
status: Fix Released → Triaged
affects: gedit (Ubuntu) → gedit-source-code-browser-plugin (Ubuntu)
Revision history for this message
Nick Rhodes (ngrhodes) wrote :

I notice that Debian has already patched this
http://metadata.ftp-master.debian.org/changelogs//main/g/gedit-source-code-browser-plugin/gedit-source-code-browser-plugin_3.0.3-3_changelog via http://packages.debian.org/hu/jessie/gedit-source-code-browser-plugin

This has been imported into trusty

I have downloaded this version from:

https://launchpad.net/ubuntu/trusty/+package/gedit-source-code-browser-plugin

And given it a quick try and seems to work fine - could someone verify ?

Revision history for this message
Isiah Meadows (impinball) wrote :

victzhang's patch worked for me (on GNOME 13.10). It definitely should be pushed upstream.

Revision history for this message
James Cowgill (jcowgill) wrote :

Fixed in version 3.0.3-3 (trusty)

Changed in gedit-source-code-browser-plugin (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Luis Alberto Pabón (copong) wrote :

This is again a thing on 16.04

Revision history for this message
Narcis Garcia (narcisgarcia) wrote :

On Ubuntu 14.04 :

(gedit:7338): libpeas-WARNING **: Could not find loader 'python' for plugin 'gitedit'

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.