#30 ValueError: list.index(x): x not in list

1.6.1
closed-accepted
Andy
5
2009-10-31
2009-10-23
Alfred Morgan
No

I have stock python installed on my 10.6.1

I found that pathlist = ['', 'usr', 'bin']

I feel that sys.executable wasn't giving what was expected. Maybe sys.prefix will work for everyone instead? It works for me, but this needs to be tested on other platforms.

Traceback (most recent call last):
File "BuildModule.py", line 24, in <module>
import environment
File "/private/tmp/development/python-ogre/environment.py", line 97, in <module>
version = pathlist[pathlist.index('Versions') + 1]
ValueError: list.index(x): x not in list

Discussion

  • Alfred Morgan
    Alfred Morgan
    2009-10-23

     
    Attachments
  • Andy
    Andy
    2009-10-31

    I've made some changes to use this only on the Mac build as it fails on other platformsn

     
  • Andy
    Andy
    2009-10-31

    • assigned_to: nobody --> andy_miller
    • status: open --> closed-accepted