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

Ronny Pfannschmidt Ronny.Pfannschmidt at gmx.de
Fri Jan 27 02:15:04 PST 2012


Hi Chris,

where is C:\Jenkins\shiningpanda\jobs\8f65ae61\tools\lib\os.py
from
it seems like it is used instead of pythons default os module
an it looks like it keeps some data out of the default env going for
custom information

HOMEDRIVE and HOMEPATH seem to be env vars on windows that are always
present under normal circumstances

-- Ronny

On 01/27/2012 10:34 AM, Chris Withers wrote:
> 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
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20120127/803922a3/attachment.pgp>


More information about the testing-in-python mailing list