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.

KeyError while installing - KeyError: 'WORKON_HOME'

See original GitHub issue

The installation of OWTF from ./owtf/owtf/install fails with a KeyError

Current Behavior

Throws a KeyError :

Traceback (most recent call last):
  File "install.py", line 307, in <module>
    installer_status_code = install(sys.argv[1:])
  File "install.py", line 211, in install
    setup_virtualenv()
  File "install.py", line 133, in setup_virtualenv
    if os.path.join(os.environ["WORKON_HOME"], "owtf") == os.environ["VIRTUAL_ENV"]:
  File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'WORKON_HOME'

Possible Solution

Check if the environment variable is set. The problem with the environment variable is not very visible on googling. (Is this out of context from OWTF point of view?)

Steps to Reproduce (for bugs)

  1. Navigate to installation folder
  2. Run the installer

Your Environment

  • Installation method used: Manual
  • Version/branch used: develop
  • Operating System and version (like Kali, Debian, ArchLinux, etc): ArchLinux
  • pip/setuptools version: pip 9.0.1
  • sudo access: Yep 😃

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
viyatbcommented, Mar 6, 2017

@sachinkamath you must’ve updated after this. The lines on your stacktrace do not exist in the latest develop.

1reaction
viyatbcommented, Mar 5, 2017

@sachinkamath you are not using the latest develop. This installer_status_code = install(sys.argv[1:]) was removed sometime back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to deploy on pythonanywhere because of KeyError
I've downloaded the pythonanywhere installation tool and am trying ... in __getitem__ raise KeyError(key) from None KeyError: 'WORKON_HOME'.
Read more >
Trying to deploy on pythonanywhere and not working
However I only got to this KeyError: WORKON_HOME after running several ... pip3 install --user pythonanywhere $ pa_autoconfigure_django.py ...
Read more >
pipenv Documentation - Read the Docs
The recommended way to install pipenv on most platforms is to install ... Fixed a keyerror which could occur when locking VCS dependencies...
Read more >
Release and Version History — pipenv 2022.12.20.dev0 ...
Fix for requirementslib hanging during install of remote wheels files. ... Fixed a keyerror which could occur when locking VCS dependencies in some...
Read more >
Scipy lecture notes - Amazon S3
If you don't have Ipython installed on your computer, other Python shells are available, such as the plain ... WORKON_HOME,. PYTHONPATH, ... KeyError:...
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