Ubuntu

Nautilus-Python broken in Oneiric

Reported by Emilien Klein on 2011-09-25
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
nautilus-python (Ubuntu)
Undecided
Unassigned
Oneiric
Undecided
Unassigned

Bug Description

== SRU ==

[Impact]
Nautilus does not works (its window is never displayed) when python-nautilus 1.0.0 and any python extension is installed

[Stable Fix]
http://tmp.fgsp.org/python-nautilus/python-nautius.patch

[Test Case]
bzr branch lp:nautilus-terminal
cd nautilus-terminal
mkdir ~/.local/share/nautilus-python/extensions
cp ./src/nautilus_terminal.py ~/.local/share/nautilus-python/extensions
nautilus -q && nautilus --no-desktop

== ORIGINAL DESCRIPTION ==

- Install Python-Nautilus in Ubuntu 11.10 (beta2 in my case)

- Create the TestExtension.py [0] from the nautilus-python Reference Manual and put it in the ~/.local/share/nautilus-python/extensions folder (as per the RM's instructions)

- Restart Nautilus: `killall nautilus` and `nautilus --no-desktop`.

The following Exceptions will apprear in your terminal, and no Nautilus extension will appear:

emilien@ubuntu1110b2:~$ nautilus --no-desktop
** (nautilus:6258): DEBUG: Syncdaemon not running, waiting for it to start in NameOwnerChanged
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 23, in <module>
    from ._gi import _API, Repository
ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))

(nautilus:6258): Nautilus-Python-WARNING **: nautilus_python_init_python failed
Traceback (most recent call last):
  File "/home/emilien/.local/share/nautilus-python/extensions/TestExtension.py", line 2, in <module>
    from gi.repository import GObject
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 23, in <module>
    from ._gi import _API, Repository
ImportError: cannot import name _API

It is thus not possible to create a Nautilus extension using Python starting with Ubuntu 11.10. I came to this conclusion while trying to fix Bug #849361. Please give directions on how to build such an extension from Python, using Nautilus-Python 1.0.

[0] http://projects.gnome.org/nautilus-python/documentation/html/nautilus-python-overview-example.html#id3054758

Launchpad Janitor (janitor) wrote :

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

Changed in nautilus-python (Ubuntu):
status: New → Confirmed
Fabien LOISON (flozz) wrote :

Vincent Untz wrote a patch for Nautilus Python:
https://bugzilla.gnome.org/show_bug.cgi?id=660348

It works for me with the patched version (upstream already applied the patch on its GIT, but there is no release for the moment).

Fabien LOISON (flozz) on 2011-10-10
tags: added: regression-proposed
Fabien LOISON (flozz) on 2011-10-13
description: updated
Martin Owens (doctormo) on 2011-10-14
tags: added: patch patch-accepted-upstream

Hello Emilien, or anyone else affected,

Accepted nautilus-python into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in nautilus-python (Ubuntu Oneiric):
status: Confirmed → Fix Committed
tags: added: verification-needed
Fabien LOISON (flozz) wrote :

nautilus python works fine with the package from -proposed

Emilien Klein (emilien-klein) wrote :

Yes, the package from -proposed does the trick (as long as you update the extensions accordingly to work with Nautilus 3.2, see https://code.launchpad.net/~flozz/nautilus-image-manipulator/nautilus-3.2-support/+merge/78864 )

Martin Pitt (pitti) on 2011-10-15
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus-python - 1.0-0ubuntu2

---------------
nautilus-python (1.0-0ubuntu2) oneiric-proposed; urgency=low

  * debian/patches/port-to-pygobject-3.0.patch:
    - Makes Nautilus Python working with Nautilus 3.2 (LP: #858925)
  * debian/patches/fix-examples.patch:
    - Updated examples to work with pygobject 3 (LP: #872863)
  * debian/rules, debian/control.in:
    - Add quilt patch system
 -- Fabien LOISON <email address hidden> Wed, 12 Oct 2011 16:07:13 +0200

Changed in nautilus-python (Ubuntu):
status: Confirmed → Fix Released
Changed in nautilus-python (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Emilien Klein (emilien-klein) wrote :

Thanks for fixing this bug.

I wanted to particularly thank Fabien LOISON for his involvement, and help in raising the awareness around this bug.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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