package no longer has WebView attribute after transition to python 2.7

Bug #688732 reported by Brian Curtis
332
This bug affects 50 people
Affects Status Importance Assigned to Milestone
pywebkitgtk (Ubuntu)
Fix Released
High
Unassigned

Bug Description

bcurtis@wx:~$ gwibber
Traceback (most recent call last):
  File "/usr/bin/gwibber", line 55, in <module>
    from gwibber import client
  File "/usr/lib/python2.7/dist-packages/gwibber/client.py", line 3, in <module>
    import gtk, gobject, gwui, util, actions, json, gconf
  File "/usr/lib/python2.7/dist-packages/gwibber/gwui.py", line 208, in <module>
    class WebUi(webkit.WebView):
AttributeError: 'module' object has no attribute 'WebView'
bcurtis@wx:~$ s /usr/lib/python2.7/dist-packages/webkit
s: command not found
bcurtis@wx:~$ ls /usr/lib/python2.7/dist-packages/webkit
__init__.pyc

Removing the above file fixes the issue

UPDATE: Exactly same error comes with miro package as well. The above workaround works for both gwibber and miro.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: python-webkit 1.1.8-1build1
ProcVersionSignature: Ubuntu 2.6.37-8.21-generic 2.6.37-rc4
Uname: Linux 2.6.37-8-generic x86_64
Architecture: amd64
Date: Fri Dec 10 15:52:41 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100803.1)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: pywebkitgtk

Related branches

Revision history for this message
Brian Curtis (bcurtiswx) wrote :
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Confirmed, I had the same problem. That file isn't getting installed for the build for python 2.6

Changed in pywebkitgtk (Ubuntu):
status: New → Confirmed
Changed in pywebkitgtk (Ubuntu):
importance: Undecided → High
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Same problem with Miro package.

summary: - transition to python2.7 causes gwibber breakage
+ package no longer has WebView attribute after transition to python 2.7
description: updated
tags: added: python27
Changed in pywebkitgtk (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Matthias Klose (doko) wrote :

I can't see or reproduce this. is this a file, a symlink? does the timestap give a hint?

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

@doko,

It sure is a file, not a symlink, which this package is installing.

Revision history for this message
Dean Loros (autocrosser) wrote :

I can also confirm that removing /usr/lib/python2.7/dist-packages/webkit removes the problem with Miro...I will note that in my bug report about this issue & Miro.

Revision history for this message
Antono Vasiljev (antono) wrote :

$ ls /usr/lib/python2.7/dist-packages/webkit
__init__.pyc

$ sudo rm -rf /usr/lib/python2.7/dist-packages/webkit/

Gwibber works again :)

Revision history for this message
Michael Terry (mterry) wrote :

This is also stopping the rhythmbox-ubuntuone-music-store plugin from working in natty.

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Solution from comment #7 works perfectly, thanks, Antono!

Revision history for this message
Chad Miller (cmiller) wrote :

Removing /usr/lib/python2.7/dist-packages/webkit/__init__.pyc should be the smallest necessary workaround. Removing the directory is unwarranted.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

This is also affecting ubuntu-sso-client, that uses pywebkitgtk as well.

Revision history for this message
dobey (dobey) wrote :

For some reason, it appears that the old /usr/lib/python2.7/dist-packages/webkit directory was left around after upgrade, and the python-support triggers are not running.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Here's the culprit: 1.1.8-1
http://launchpadlibrarian.net/58035990/buildlog_ubuntu-natty-amd64.pywebkitgtk_1.1.8-1_BUILDING.txt.gz

chroot-autobuild/build/buildd/python-webkit_1.1.8-1_amd64.deb:
drwxr-xr-x root/root 0 2010-10-22 12:16 ./
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/share/
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/share/python-support/
-rw-r--r-- root/root 100 2010-10-22 12:16 ./usr/share/python-support/python-webkit.public
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/share/doc/
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/share/doc/python-webkit/
-rw-r--r-- root/root 53 2010-08-07 08:40 ./usr/share/doc/python-webkit/AUTHORS
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/share/doc/python-webkit/examples/
-rwxr-xr-x root/root 16232 2010-08-07 08:40 ./usr/share/doc/python-webkit/examples/browser.py
-rw-r--r-- root/root 3028 2010-08-07 08:40 ./usr/share/doc/python-webkit/examples/inspector.py
-rw-r--r-- root/root 1104 2010-08-07 12:23 ./usr/share/doc/python-webkit/NEWS.gz
-rw-r--r-- root/root 2148 2009-06-01 18:52 ./usr/share/doc/python-webkit/copyright
-rw-r--r-- root/root 1229 2010-08-07 08:40 ./usr/share/doc/python-webkit/README
-rw-r--r-- root/root 1386 2010-09-10 21:34 ./usr/share/doc/python-webkit/changelog.Debian.gz
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/share/pyshared/
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/share/pyshared/webkit/
-rw-r--r-- root/root 897 2010-10-22 12:16 ./usr/share/pyshared/webkit/__init__.py
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/lib/
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/lib/pyshared/
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/lib/pyshared/python2.6/
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/lib/pyshared/python2.6/webkit/
-rw-r--r-- root/root 85096 2010-10-22 12:16 ./usr/lib/pyshared/python2.6/webkit/webkit.so
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/lib/python2.7/
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/lib/python2.7/dist-packages/
drwxr-xr-x root/root 0 2010-10-22 12:16 ./usr/lib/python2.7/dist-packages/webkit/
-rw-r--r-- root/root 85096 2010-10-22 12:16 ./usr/lib/python2.7/dist-packages/webkit/webkit.so
-rw-r--r-- root/root 323404 2010-10-22 12:16 ./usr/lib/python2.7/dist-packages/webkit/webkit.a
-rw-r--r-- root/root 897 2010-10-22 12:16 ./usr/lib/python2.7/dist-packages/webkit/__init__.py
-rw-r--r-- root/root 1404 2010-10-22 12:16 ./usr/lib/python2.7/dist-packages/webkit/webkit.la

Clearly incorrect contents. I guess the best we can do as add a cleanup to postrm, which we only need to keep for a release or so.

Revision history for this message
Stefano Rivera (stefanor) wrote :

I'll prepare a debdiff, but need to deal with a broken CDBS first...

Revision history for this message
Barry Warsaw (barry) wrote :

Hi Stefano. When you say "broken CDBS" do you mean this error, which I get in a local sbuild?

chmod a+x /build/barry-pywebkitgtk_1.1.8-1ubuntu1-amd64-kAEqvo/pywebkitgtk-1.1.8/./configure
mkdir -p debian/build/2.6
cd debian/build/2.6 && CFLAGS="-g -O2 -g -O2" CXXFLAGS="-g -O2 -g -O2" CPPFLAGS="" LDFLAGS="-Wl,-Bsymbolic-functions" PYTHON=python2.6" /build/barry-pywebkitgtk_1.1.8-1ubuntu1-amd64-kAEqvo/pywebkitgtk-1.1.8/./configure --build=x86_64-linux-gnu --prefix=/usr --includedir="\${prefix}/include" --mandir="\${prefix}/share/man" --infodir="\${prefix}/share/info" --sysconfdir=/etc --localstatedir=/var --libexecdir="\${prefix}/lib/pywebkitgtk" --disable-maintainer-mode --disable-dependency-tracking --disable-silent-rules
/bin/sh: Syntax error: Unterminated quoted string
make: *** [debian/stamp-autotools/2.6] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Revision history for this message
Stefano Rivera (stefanor) wrote :

Barry: Correct, LP: #705426

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

This bug was fixed in the package pywebkitgtk - 1.1.8-1ubuntu2

---------------
pywebkitgtk (1.1.8-1ubuntu2) natty; urgency=low

  * Cleanup after 1.1.8-1 which may have left a .pyc in
    /usr/lib/python2.7/dist-packages/webkit/ (LP: #688732)
 -- Stefano Rivera <email address hidden> Tue, 01 Feb 2011 14:33:18 +0100

Changed in pywebkitgtk (Ubuntu):
status: Triaged → 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.