Python path appears to be searched out of sequence - intermittent

Bug #104971 reported by Scott Kitterman on 2007-04-09
2
Affects Status Importance Assigned to Milestone
python-defaults (Ubuntu)
Undecided
Matthias Klose

Bug Description

Bug #80287 appears to be a consequence of a problem with not all the directories in python path being searched in order.

Note: This happens on some, but not all Feisty systems.

Steps to reproduce:

Install pysol 4.82.1-4.1ubuntu3 or earlier (I am working on a ubuntu4 that will work around this).
Start a python interpreter.

>>> import sys
>>> sys.path.insert(0, '/usr/share/games/pysol')
>>> from random import constructRandom
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name constructRandom
>>> print sys.path
['/usr/share/games/pysol', '', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/var/lib/python-support/python2.5', '/var/lib/python-support/python2.5/gtk-2.0']
>>>
contructRandom is in the pysol provided random.py that should be checked before the system python modules. Printing sys.path confirms that the directory with the file is in fact in the python path.

Matthias Klose (doko) wrote :

that's unreproducible for me in gutsy with python2.4 and python2.5 (after renaming the pysol_random.py file). Closing as invalid. Please reopen if it's reproducible for you.

Changed in python-defaults:
assignee: nobody → doko
status: New → Incomplete
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers