[Pytest-commit] Issue #260: Fatal Python error when running 32bit Python via tox on Windows (hpk42/tox)

Florian Bruhin issues-reply at bitbucket.org
Tue Jun 23 20:47:48 CEST 2015


New issue 260: Fatal Python error when running 32bit Python via tox on Windows
https://bitbucket.org/hpk42/tox/issue/260/fatal-python-error-when-running-32bit

Florian Bruhin:

With this tox.ini:

```ini
[testenv]
commands = {envpython} -c 'print("Hello World")'
basepython = C:\Python34_x32\python.exe
```

and a minimal setup.py:

```python
from setuptools import setup
setup()
```

I get this when running it on Windows:

```
C:\Users\florian\proj\qutebrowser\test>tox -e py34
GLOB sdist-make: C:\Users\florian\proj\qutebrowser\test\setup.py
py34 create: C:\Users\florian\proj\qutebrowser\test\.tox\py34
ERROR: invocation failed (exit code 3), logfile: C:\Users\florian\proj\qutebrowser\test\.tox\py34\log\py34-0.log
ERROR: actionid: py34
msg: getenv
cmdargs: ['C:\\Python34\\python.exe', '-m', 'virtualenv', '--python', 'C:\\Python34_x32\\python.exe', 'py34']
env: {'USERNAME': 'florian', 'SSHSESSIONID': '1003', 'PROGRAMFILES': 'C:\\Program Files', 'SYSTEMROOT': 'C:\\Windows', 'USERDOMAIN': 'qemu-win8', 'COMPUTERNAME': 'QEMU-WIN8', 'PROCESSOR_REVISION': '1a03', 'PYTHON': 'C:\\Python
34', 'PUBLIC': 'C:\\Users\\Public', 'PROMPT': '$P$G', 'PSMODULEPATH': 'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'VIM_EXE_DIR': 'C:\\Program Files (x86)\\Vim\\vim74', 'LOGONSERVER': '\\\\QEMU-WIN8', 'SSH_CLIE
NT': '192.168.122.1 39354 22', 'PROGRAMW6432': 'C:\\Program Files', 'TEMP': 'C:\\Users\\florian\\AppData\\Local\\Temp', 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'ALLUSERSPROFILE': 'C:\\ProgramData', 'SSHWINGROU
P': 'EVERYONE', 'PROGRAMFILES(X86)': 'C:\\Program Files (x86)', 'SSH_CONNECTION': '192.168.122.1 39354 192.168.122.85 22', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'SYSTEMDRIVE': 'C:', 'PROCESSOR_IDENTIFIER':
 'Intel64 Family 6 Model 26 Stepping 3, GenuineIntel', 'TMP': 'C:\\Users\\florian\\AppData\\Local\\Temp', 'HOMEDRIVE': 'C:', 'OS': 'Windows_NT', 'HOME': 'C:\\Users\\florian', 'LOCALAPPDATA': 'C:\\Users\\florian\\AppData\\Local
', 'HOMEPATH': '\\Users\\florian', 'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files', 'VIRTUAL_ENV': 'C:\\Users\\florian\\proj\\qutebrowser\\test\\.tox\\py34', 'SSHWINUSERDOMAIN': 'qemu-win8', 'NUMBER_OF_PROCESSORS': '1'
, 'USERPROFILE': 'C:\\Users\\florian', 'PROGRAMDATA': 'C:\\ProgramData', 'WINDIR': 'C:\\Windows', 'PATH': 'C:\\Users\\florian\\proj\\qutebrowser\\test\\.tox\\py34\\Scripts;C:\\Python34\\Lib\\site-packages\\PyQt5;C:\\Python34_x
32\\Lib\\site-packages\\PyQt5;C:\\asciidoc;C:\\Python34\\;C:\\Python34\\Scripts;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Git\\cmd;C
:\\asciidoc-8.6.9', 'APPDATA': 'C:\\Users\\florian\\AppData\\Roaming', 'WINSSHDGROUP': 'EVERYONE', 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files', 'SSHWINUSER': 'florian', 'COMSPEC': 'C:\\Windows\\system32\
\cmd.exe', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY', 'FP_NO_HOST_CHECK': 'NO', 'PYTHONHASHSEED': '883', 'USERDOMAIN_ROAMINGPROFILE': 'qemu-win8'}

Fatal Python error: Failed to initialize Windows random API (CryptoGen)
Running virtualenv with interpreter C:\Python34_x32\python.exe

ERROR: InvocationError: C:\Python34\python.exe -m virtualenv --python C:\Python34_x32\python.exe py34 (see C:\Users\florian\proj\qutebrowser\test\.tox\py34\log\py34-0.log)
```

Searching for the error [it seems](http://bugs.python.org/issue20614) this happens when `SYSTEMROOT` is not set.

Even though `SYSTEMROOT` is printed in the environment above, I tried to add `passenv = *` and `setenv = SYSTEMROOT=C:\Windows` without any success.

When I run that Python install by hand, it works fine. When I use a 64bit install instead of the 32bit one on the same machine, it's fine as well.

I also tried downgrading to 1.9.2 and it happens there as well, so it doesn't seem to be a recent `passenv` change.





More information about the pytest-commit mailing list