[TIP] [tox] KeyError: 'HOMEDRIVE' on Windows

Chris Withers chris at simplistix.co.uk
Fri Jan 27 01:34:26 PST 2012


Hi Holger,

This looks like a Tox problem:

[windows] $ cmd.exe /C 
'"C:\Jenkins\shiningpanda\jobs\8f65ae61\tools\Scripts\python.exe -c 
"import tox; tox.cmdline();" -c tox.ini && exit %%ERRORLEVEL%%"'
Traceback (most recent call last):
   File "<string>", line 1, in <module>
   File 
"C:\Jenkins\shiningpanda\jobs\8f65ae61\tools\Lib\site-packages\tox\_cmdline.py", 
line 18, in main
     config = parseconfig(args, 'tox')
   File 
"C:\Jenkins\shiningpanda\jobs\8f65ae61\tools\Lib\site-packages\tox\_config.py", 
line 23, in parseconfig
     parseini(config)
   File 
"C:\Jenkins\shiningpanda\jobs\8f65ae61\tools\Lib\site-packages\tox\_config.py", 
line 129, in __init__
     config.homedir = py.path.local._gethomedir()
   File 
"C:\Jenkins\shiningpanda\jobs\8f65ae61\tools\Lib\site-packages\py\_path\local.py", 
line 627, in _gethomedir
     x = os.environ["HOMEDRIVE"] + os.environ['HOMEPATH']
   File "C:\Jenkins\shiningpanda\jobs\8f65ae61\tools\lib\os.py", line 
433, in __getitem__
     return self.data[key.upper()]
KeyError: 'HOMEDRIVE'
Build step 'Tox Builder' marked build as failure
Recording test results
Finished: FAILURE

What is HOMEDRIVE and HOMEPATH used for and where does Tox usually find 
them? I guess I can set these up on the node config until Tox is fixed, 
but I'd like to know what to set them too ;-)

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk



More information about the testing-in-python mailing list