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.

pew Failing To Enter Virtual Environment

See original GitHub issue

Attempt to enter newly-created or existing virt environment blows out on some of our systems - so far seen on one FreeBSD 10-STABLE VPS and one CentOS VPS. It seems fine on FreeBSD-Stable on physical machines, Linux Mint 17/Physical, and CentOS7/VPS. Details:

~>pew workon foo
Traceback (most recent call last):
  File "/usr/local/bin/pew", line 11, in <module>
    sys.exit(pew())
  File "/usr/local/lib/python2.7/site-packages/pew/pew.py", line 738, in pew
    return command(sys.argv[2:])
  File "/usr/local/lib/python2.7/site-packages/pew/pew.py", line 355, in workon_cmd
    shell(env, cwd=project_dir)
  File "/usr/local/lib/python2.7/site-packages/pew/pew.py", line 200, in shell
    fork_bash(env, cwd)
  File "/usr/local/lib/python2.7/site-packages/pew/pew.py", line 157, in fork_bash
    with NamedTemporaryFile('w+') as rcfile:
  File "/usr/local/lib/python2.7/site-packages/pew/_utils.py", line 27, in NamedTemporaryFile
    return getwriter(encoding)(_ntf(mode))
  File "/usr/local/lib/python2.7/codecs.py", line 1009, in getwriter
    return lookup(encoding).streamwriter
TypeError: lookup() argument 1 must be string, not None

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
berdariocommented, Sep 2, 2016

Good, but why “automatically set locale environment” sets it as C (which only allows ASCII)?

I guess that at the very least I should provide a better error message

0reactions
tundratimcommented, Sep 17, 2016

This was just to prove that the fix worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pew fails when attempting to create virtualenv name starting ...
The example below shows how I'm running into this error with pipenv. A stripped down test case for just pew though is just...
Read more >
pipenv fails to create a virtual environment - Stack Overflow
I create a folder or my Python project and cd into it. I type 'pipenv shell'. I get the following error: Creating a...
Read more >
As schools close due to the coronavirus, some U.S. students ...
As K-12 officials in many states close schools and shift classes and assignments online due to the spread of the new coronavirus, they...
Read more >
pipenv fails on Ubuntu 20.04 - python - Super User
I was fortunate enough to stumble onto the answer in this thread concerning the underlying implementation of virtualenv :
Read more >
Issue 37369: Issue with pip in venv on Powershell in Windows
3 installed from the Microsoft Store, when I create a virtualenv via "python -m venv <name>" and activate it in Powershell with the...
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