Multiple module import warning from ubuntu-bug

Bug #552419 reported by mikbini
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
launchpadlib
Invalid
Undecided
Unassigned
python-launchpadlib (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: apport

Running ubuntu-bug from the command line I get:

$ ubuntu-bug apport
/usr/lib/pymodules/python2.6/lazr/restfulclient/__init__.py:19: UserWarning: Module launchpadlib was already imported from /usr/lib/pymodules/python2.6/launchpadlib/__init__.py, but /usr/lib/pymodules/python2.6 is being added to sys.path
  import pkg_resources

Everything seems to work correctly anyway.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: apport 1.13.1-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-18.27-generic 2.6.32.10+drm33.1
Uname: Linux 2.6.32-18-generic i686
NonfreeKernelModules: wl
ApportLog:
 apport (pid 2599) Wed Mar 31 07:57:06 2010: called for pid 2597, signal 6
 apport (pid 2599) Wed Mar 31 07:57:06 2010: executable: /usr/lib/gvfs/gvfsd-smb (command line "/usr/lib/gvfs/gvfsd-smb --spawner :1.5 /org/gtk/gvfs/exec_spaw/2")
 apport (pid 2599) Wed Mar 31 07:57:07 2010: wrote report /var/crash/_usr_lib_gvfs_gvfsd-smb.1000.crash
Architecture: i386
Date: Wed Mar 31 10:09:14 2010
InstallationMedia: Error: [Errno 13] Permission denied: '/var/log/installer/media-info'
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: apport

Revision history for this message
mikbini (mikbini) wrote :
Changed in apport (Ubuntu):
status: New → Confirmed
Revision history for this message
Robert Collins (lifeless) wrote :

This is affecting many launchpadlib clients - pqm, bzr, apport

affects: apport (Ubuntu) → python-launchpadlib (Ubuntu)
Gary Poster (gary)
Changed in launchpadlib:
status: New → Invalid
Revision history for this message
Robert Collins (lifeless) wrote :

How is this invalid ?

Revision history for this message
Robert Collins (lifeless) wrote :

Specifically, this makes bzr and many other scripts ugly; we should only fix this once. If its not a problem with launchpadlib, point us where you think the problem is and we can fix it. However, at the moment, only launchpadlib exhibits this problem, and its a really unpleasant UI wart - we'll want to do an SRU to lucid to fix it up, at minimum.

Revision history for this message
Harald Sitter (apachelogger) wrote :

Because it probably needs to be fixed in the ubuntu package python-launchpadlib.

Revision history for this message
Robert Collins (lifeless) wrote :

Some more data: running a script that imports launchpadlib, as root, showed the warning, but fixed it for subsequent runs as a normal user. Hypothesis - something stale, non-rebuilt stuff somewhere and packaging scripts not fixing it. This may mean that most users won't encounter it. It certainly means I don't anymore (and can't reproduce it either). I'm going to look for files it modified though.

Revision history for this message
Robert Collins (lifeless) wrote :

find . -mtime 0 in /usr/lib/pymodules:
./python2.6/launchpadlib
./python2.6/launchpadlib/__init__.pyc
./python2.6/launchpadlib/launchpad.pyc

Revision history for this message
Gary Poster (gary) wrote :

The only way in which launchpadlib-the-software is involved is by importing pkg_resources. That's the only line of code from the software that has run when the UserWarning occurs. That's why I believe it to be invalid.

Robert and I talked about this on IRC, and he got the results described above in comments 6 and 7. Pertinent notes, from my perspective, follow.

- Robert said that this is hard to dupe. It was happening consistently on his machines. Other developers did not see, or reported seeing in the past but do not see now.

- I suspect the cause is some combination of the system (post-update, post-delete, or post-addition of some package) + setuptools + our Ubuntu python dances. Robert's mtime search suggests that a launchpadlib upgrade might cause this? It seems unlikely, but there's nothing to contradict it.

If we can dupe, I'm happy to help. I'm not sure what else to do.

Revision history for this message
Robert Collins (lifeless) wrote :

I'm not sure either; it seems unlikely to be an explicit action taken by launchpadlib; sigh setuptools. Possibly best to just FAQ-and-close in Ubuntu as well.

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

This bug no longer exists in maverick. Thanks!

Changed in python-launchpadlib (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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