-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'str' object has no attribute 'exists' #1674
Comments
@gaborbernat here's the simplest reproduction: $ VIRTUALENV_EXTRA_SEARCH_DIR=d virtualenv venv
AttributeError: 'str' object has no attribute 'exists' |
Will take a look tomorrow, but feel free to make a pr before 😎 |
@milind-shakya-sp in the meantime you can probably work around this by unsetting |
here's a patch which "fix"es this but feels not the right idea: diff --git a/src/virtualenv/seed/embed/base_embed.py b/src/virtualenv/seed/embed/base_embed.py
index 98ba65f..b7d6a99 100644
--- a/src/virtualenv/seed/embed/base_embed.py
+++ b/src/virtualenv/seed/embed/base_embed.py
@@ -18,7 +18,7 @@ class BaseEmbed(Seeder):
super(BaseEmbed, self).__init__(options, enabled=options.no_seed is False)
self.download = options.download
- self.extra_search_dir = [i.resolve() for i in options.extra_search_dir if i.exists()]
+ self.extra_search_dir = [Path(i).resolve() for i in options.extra_search_dir if Path(i).exists()]
def latest_is_none(key):
value = getattr(options, key)
@@ -57,7 +57,6 @@ class BaseEmbed(Seeder):
parser.add_argument(
"--extra-search-dir",
metavar="d",
- type=Path,
nargs="+",
help="a path containing wheels the seeder may also use beside bundled (can be set 1+ times)",
default=[], |
Resolves #1674. Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
Hello, a fix for this issue has been released via virtualenv 20.0.8; see https://pypi.org/project/virtualenv/20.0.8/ (https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-8-2020-03-04). Please give a try and report back if your issue has not been addressed; if not, please comment here, and we'll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release. |
Issue
Describe what's the expected behaviour and what you're observing.
virtualenv throws an attributeerror when
python -m virtualenv venv -ppython3 --with-traceback
is runEnvironment
Provide at least:
pip list
of the host python wherevirtualenv
is installed:Output of the virtual environment creation
Make sure to run the creation with
-vvv --with-traceback
:Python: 3.6.8
virtualenv: 20.0.7
The text was updated successfully, but these errors were encountered: