question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors if WORKON_HOME is not writable could be better

See original GitHub issue

Pipenv version: 2018.7.1 The first error is OK (the PermissionError), but then there’s a lot more.

$ WORKON_HOME=/opt/ pipenv sync
Creating a virtualenv for this project...
Pipfile: /home/me/project/Pipfile
Using /usr/bin/python3.6m (3.6.5) to create virtualenv...
⠋Running virtualenv with interpreter /usr/bin/python3.6m
Using base prefix '/usr'
Traceback (most recent call last):
  File "/home/me/.local/lib/python3.6/site-packages/virtualenv.py", line 2343, in <module>
    main()
  File "/home/me/.local/lib/python3.6/site-packages/virtualenv.py", line 712, in main
    symlink=options.symlink)
  File "/home/me/.local/lib/python3.6/site-packages/virtualenv.py", line 927, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "/home/me/.local/lib/python3.6/site-packages/virtualenv.py", line 1112, in install_python
    mkdir(lib_dir)
  File "/home/me/.local/lib/python3.6/site-packages/virtualenv.py", line 324, in mkdir
    os.makedirs(path)
  File "/usr/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/opt/clump-D6KMH_ut'
Error while trying to remove the /opt/clump-D6KMH_ut env:
No such file or directory

Virtualenv location:                                                                                                                            Traceback (most recent call last):
  File "/home/me/.local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/cli.py", line 1049, in sync
    pypi_mirror=pypi_mirror,
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/core.py", line 2504, in do_sync
    ensure_project(three=three, python=python, validate=False, deploy=deploy, pypi_mirror=pypi_mirror)
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/core.py", line 614, in ensure_project
    path_to_python = which('python') or which('py')
  File "/home/me/.local/lib/python3.6/site-packages/pipenv/core.py", line 115, in which
    p = os.path.join(location, 'bin', command)
  File "/usr/lib/python3.6/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Jan 20, 2019

The thing I wonder is whether we should hide the traceback. Users tend to think it is a bug in the software and report it. We don’t want that perception.

1reaction
uranusjrcommented, Jan 19, 2019

A conservative check for PermissionError at the last line is practical enough IMO, although it’d probably be good to submit a similar patch to virtualenv to make it emit a sensible error on its own.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am unable to create a new virtualenv in ubuntu?
I got the error while updating dependencies with poetry. Uninstalling virtualenv package that was present in the venv (probably as subdependency ...
Read more >
Getting SSH to work on Home Assistant host via port 22222 ...
First of all, I am running the “alternative” NAS installation of the official image which is running on Synology VM manager.
Read more >
virtualenvwrapper Documentation
The variable WORKON_HOME tells virtualenvwrapper where to place your virtual environments. The default is. $HOME/.virtualenvs. If the directory ...
Read more >
Installation issues for Virtualenv and VirtualenvWrapper in ...
Your trying to install a virtualenv on a mountpoint that does not support symbolic links . If you look at the output of...
Read more >
Ray images should not assume any particular uid
anaconda3/lib/python3.7/site-packages (1.20.0) ERROR: Could not install packages ... environment for doing the pipenv install of the Pipfile; # WORKON_HOME ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found