[issue33193] Cannot create a venv on Windows when directory path contains dollar character
Stuart Cuthbertson
report at bugs.python.org
Sat Mar 31 22:25:44 EDT 2018
New submission from Stuart Cuthbertson <stuart at sjcuthbertson.me.uk>:
I should clarify first that I haven't reproduced the following bug specifically with venv. I was asked to raise this here after raising an identical issue about virtualenv (https://github.com/pypa/virtualenv/issues/1154); a GitHub user told me this would also apply to venv.
The bug with virtualenv is that it errors if passed a directory that contains a $ (dollar symbol). $ is a valid character for Windows directory names, filenames, and usernames. So running something simple like `python3 -m venv` (presumably) can fail in some valid Windows directories.
The full error traceback for virtualenv is available at the above GitHub URL. A commenter in the virtualenv project (see https://github.com/pypa/virtualenv/issues/457#issuecomment-377159868) suggested that this happens because the directory path is passed as-is (with $) to distutils, and distutils is seeing the text following the $ as a placeholder and trying to replace it with a variable, which isn't found.
----------
components: Windows
messages: 314755
nosy: Stuart Cuthbertson, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Cannot create a venv on Windows when directory path contains dollar character
type: crash
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33193>
_______________________________________
More information about the Python-bugs-list
mailing list