[Buildbot-devel] ppp -> peculiar python problem

Alexander Lorenz lorenz at testingtech.de
Mon Jul 3 13:10:16 UTC 2006


Marnix Klooster wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Alexander Lorenz wrote:
>
>   
>> hi all,
>>
>> all of a sudden i'm having a very strange python problem:
>>
>>
>> the buldbot/bin/buildbot script won't run and says:
>>
>>
>> Traceback (most recent call last):
>>   File "/net/ttech/share/buildbot/buildbot-packages/bin/buildbot", line 
>> 3, in ?
>>     import buildbot.scripts.runner as runner
>>   File "/net/ttech/share/buildbot/buildbot-packages/bin/buildbot.py", 
>> line 3, in ?
>>     import buildbot.scripts.runner as runner
>> ImportError: No module named scripts.runner
>>
>> but scripts/runner is definitely there!
>> yes. i know it's slightly modified from the original, but also the "from 
>> ... import ..." version does not work and throws the same error.
>>
>> the funny thing is:
>> when i start the interpreter at the exact same location and type:
>>
>> import buildbot.scripts.runner as runner
>> runner.run()
>>
>>
>> it works just fine!
>>
>> so the PYTHONPATH should be correct.
>>
>>
>> any ideas or help is welcome.
>>     
>
> One thing I would try: at the beginning of this script, before the
> failing import statement, print sys.path (= PYTHONPATH as picked up by
> the interpreter).  Another thing to try: print the environment
> (os.environ).  (Just remember to "import sys" and "import os" just
> before that.)
>
> Just what I would do first...
>
> Groetjes,
>  <><
> Marnix
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFEpXmUjn9v+6JsL6sRAnlSAJ9laEfJuoGff8Ye00lRvGhLVj8yCQCfZutN
> zIXkiRStNxngYfUGGwo0eaA=
> =+d3Z
> -----END PGP SIGNATURE-----
>
>   

i still cannot figure it out.

PYTHONPATH is set to:
setenv PYTHONPATH 
/net/ttech/share/buildbot/buildbot-packages/lib/python2.4/site-packages/



this is the sys.path from the script:
(why is it double?)


['/net/ttech/share/buildbot/buildbot-packages/bin', 
'/net/ttech/share/buildbot/buildbot-packages/lib/python2.4/site-packages', 
'/usr/lib/python24.zip', '/usr/lib/python2.4', 
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', 
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
['/net/ttech/share/buildbot/buildbot-packages/bin', 
'/net/ttech/share/buildbot/buildbot-packages/lib/python2.4/site-packages', 
'/usr/lib/python24.zip', '/usr/lib/python2.4', 
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', 
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']

and this is the one from the interpreter:

['', 
'/net/ttech/share/buildbot/buildbot-packages/lib/python2.4/site-packages', 
'/usr/lib/python24.zip', '/usr/lib/python2.4', 
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', 
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']

the only thing i see which the interpreter path has that the shellscript 
path hasn't , is the empty element right at the beginning.

but could that really be the cause?


still same thing: interpreter works, script doesn't find scripts.runner :(



regards

lx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20060703/c63d7ccf/attachment.html>


More information about the devel mailing list