Skip to content
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

Report more meaningful errors on why virtualenv creation failed #556

Merged
merged 1 commit into from
Jul 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions tox/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,19 @@ def setupenv(self, venv):
envlog = self.resultlog.get_envlog(venv.name)
try:
status = venv.update(action=action)
except tox.exception.InvocationError:
status = sys.exc_info()[1]
except FileNotFoundError as e:
status = (
"Error creating virtualenv. "
"Note that spaces in path are not supported by virtualenv. "
"Error details: %r" % e
)
except tox.exception.InvocationError as e:
status = (
"Error creating virtualenv. "
"Note that some special characters (such as ':' and unicode symbols) "
"in path are not supported by virtualenv. "
"Error details: %r" % e
)
if status:
commandlog = envlog.get_commandlog("setup")
commandlog.add_command(["setup virtualenv"], str(status), 1)
Expand Down