virtualenv icon indicating copy to clipboard operation
virtualenv copied to clipboard

20.15.0 - 'PythonInfo' object has no attribute 'version_nodot' (Jenkins / tox / py35)

Open matthuisman opened this issue 3 years ago • 9 comments

Suddenly getting the below with the latest virtualenv 20.15.0 This is on a work jenkins build so I am unable to provide any more details / logs than below. Hopefully its enough.

unittest-py35 uses C:\Python35\python.exe
unittest-py35 start: getenv C:\jenkins\workspace\omation_report_generators_master@2\.tox\unittest-py35
unittest-py35 cannot reuse: no previous config C:\jenkins\workspace\omation_report_generators_master@2\.tox\unittest-py35\.tox-config1
unittest-py35 create: C:\jenkins\workspace\omation_report_generators_master@2\.tox\unittest-py35
[49544] C:\jenkins\workspace\omation_report_generators_master@2\.tox$ 'C:\jenkins\workspace\omation_report_generators_master@2\venv\Scripts\python.exe' -m virtualenv --no-download --python 'C:\Python35\python.exe' unittest-py35
AttributeError: 'PythonInfo' object has no attribute 'version_nodot'
ERROR: invocation failed (exit code 1)
ERROR: InvocationError for command 'C:\jenkins\workspace\omation_report_generators_master@2\venv\Scripts\python.exe' -m virtualenv --no-download --python 'C:\Python35\python.exe' unittest-py35 (exited with code 1)
unittest-py35 finish: getenv C:\jenkins\workspace\omation_report_generators_master@2\.tox\unittest-py35 after 9.27 seconds
___________________________________ summary ___________________________________
ERROR:   unittest-py35: InvocationError for command 'C:\jenkins\workspace\omation_report_generators_master@2\venv\Scripts\python.exe' -m virtualenv --no-download --python 'C:\Python35\python.exe' unittest-py35 (exited with code 1)
cleanup C:\jenkins\workspace\omation_report_generators_master@2\.tox\.tmp\package\1\report_generators-1.0.42+4c3f2cb-py2.py3-none-any.whl

The py27 and py37 steps still work fine. So appears to be just py35 Maybe TOX needs to be updated to support?

matthuisman avatar Jun 26 '22 21:06 matthuisman

Probably the cache is not forward compatible. Can you clear the app data for virtualenv and try again as a quick workaround until we fix this?

gaborbernat avatar Jun 27 '22 01:06 gaborbernat

python -m virtualenv api -vvv --reset-app-data correct for doing that?

matthuisman avatar Jun 27 '22 01:06 matthuisman

Yeah, or rm -rf the folder pointed out in virtualenv --help

gaborbernat avatar Jun 27 '22 01:06 gaborbernat

Yes, that fixed the issue. Would you like me to close this issue or keep it open?

matthuisman avatar Jun 27 '22 02:06 matthuisman

Let's keep it open.

gaborbernat avatar Jun 27 '22 02:06 gaborbernat

I was getting this for py36 as well, although the --reset-app-data command, or removing the cache manually, did solve it.

teamshortcut avatar Jun 27 '22 12:06 teamshortcut

It seems like this issue is Windows specific, I have not seen it on the Linux nodes.

Are there any plans for automatic cache migration or deletion? It is a pain to run the command on 50+ Windows build nodes 😅.

bparzella avatar Jul 08 '22 11:07 bparzella

I'll try to put in a fix release that would address this 😮 been just busy with other stuff, would help if you could put in that PR 👍

gaborbernat avatar Jul 08 '22 20:07 gaborbernat

Downgrade isn't a good solution, please instead do the python -m virtualenv api -vvv --reset-app-data to solve it.

gaborbernat avatar Jul 18 '22 16:07 gaborbernat

I think this is fixed now.

gaborbernat avatar Jun 27 '23 03:06 gaborbernat