autopilot.platform can supercede python library platform module in module search path

Bug #1180124 reported by Francis Ginther
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Autopilot
Fix Released
Critical
Unassigned
autopilot (Ubuntu)
Fix Released
Undecided
Unassigned
Raring
Won't Fix
Undecided
Unassigned

Bug Description

We're seeing these failures in the daily-release testing when running python-autopilot-tests [1]:
Traceback (most recent call last):
  File "/usr/bin/autopilot", line 41, in <module>
    from platform import node
ImportError: cannot import name node

I instrumented /usr/bin/autopilot and when this happens, sys.path is:
sys.path: ['/usr/bin', '/usr/lib/python2.7/dist-packages/autopilot', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']

And an import of platform gives:
dir platform: ['_PlatformDetector', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '_get_property_file', '_parse_build_properties_file', 'exists', 'image_codename', 'model']

This is because '/usr/lib/python2.7/dist-packages/autopilot' is second in the search path, before the python libs. I think this happens as a result of the autopilot tests creating a test script and running autopilot during the autopilot run.

[1] - https://jenkins.qa.ubuntu.com/job/ps-generic-autopilot-release-testing/365/label=autopilot-intel/artifact/results/artifacts/ap_test_debug_log.txt

[Reproduce]
Run python-autopilot-tests from the raring package.

Related branches

description: updated
Changed in autopilot:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 1.3.1
Changed in autopilot:
status: Triaged → In Progress
assignee: nobody → Thomi Richards (thomir)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:autopilot at revision None, scheduled for release in autopilot, milestone 1.3.1

Changed in autopilot:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopilot - 1.3daily13.06.05-0ubuntu2

---------------
autopilot (1.3daily13.06.05-0ubuntu2) saucy; urgency=low

  * autopilot-touch only suggests python-ubuntu-platform-api for now.
    It's not in distro and we need that requirement to be fulfilled to
    have unity 7, 100 scopes and the touch stack to distro.
 -- Didier Roche <email address hidden> Fri, 07 Jun 2013 13:33:46 +0200

Changed in autopilot (Ubuntu):
status: New → Fix Released
Changed in autopilot:
status: Fix Committed → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

raring has seen the end of its life and is no longer receiving any updates. Marking the raring task for this ticket as "Won't Fix".

Changed in autopilot (Ubuntu Raring):
status: New → Won't Fix
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.