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.

2021.11.9: "pipenv run" raised TypeError in pipenv.core.do_run_posix()

See original GitHub issue

Happens with 2021.11.9, works with: 2021.5.29

# pipenv run pip freeze
Loading .env environment variables...
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/cli/command.py", line 413, in run
    do_run(
  File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 2495, in do_run
    run_fn(*run_args, **run_kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 2442, in do_run_posix
    os.execve(
TypeError: expected str, bytes or os.PathLike object, not NoneType
$ pipenv --support

Pipenv version: '2021.11.9'

Pipenv location: '/usr/local/lib/python3.8/site-packages/pipenv'

Python location: '/usr/local/bin/python'

Python installations found:

  • 3.8.12: /usr/local/bin/python
  • 3.8.12: /usr/local/bin/python3
  • 3.8.12: /usr/local/bin/python3.8
  • 2.7.16: /usr/bin/python
  • 2.7.16: /usr/bin/python2
  • 2.7.16: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.8.12',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.4.0-89-generic',
 'platform_system': 'Linux',
 'platform_version': '#100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021',
 'python_full_version': '3.8.12',
 'python_version': '3.8',
 'sys_platform': 'linux'}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
melvyn-aprylcommented, Jan 13, 2022

It struggles with variables without values:

# set to yes or no
DEBUG

python-dotenv ignores these (and doesn’t set the variable either).

1reaction
melvyn-aprylcommented, Mar 14, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipenv throws and error when installing in docker
I am able to run it outside of docker properly. But docker build fails. docker build --platform=linux/amd64 -t shopwalk/location-api:latest .
Read more >
Why I cannot create pipenv shell in ubuntu 20.04 LTS with ...
I was facing the same problem on Ubuntu 20.04, but since you are on heroku I am not sure if you can execute...
Read more >
Pipenv: 'NoneType' object is not subscriptable - Super User
I install the environment with the pipenv. Python 3.7.4. ... I tried running with version of Python: in file .env and in command-line...
Read more >
Pipenv Virtual Environments for Python - Blog Post
Pipenv is an amazing replacement for virtualenv and it's highly recommend ... If you have errors, just use pipenv --python python or start...
Read more >
Pipenv Crash Course - YouTube
Create a better Python workflow by using Pipenv which allows you to install Python packages within a virtual environment easily.
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