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

All environments disappeared, cannot add any #944

Closed
catusf opened this issue Nov 2, 2015 · 7 comments
Closed

All environments disappeared, cannot add any #944

catusf opened this issue Nov 2, 2015 · 7 comments
Assignees
Labels
Milestone

Comments

@catusf
Copy link

catusf commented Nov 2, 2015

Today when I triedto add a custom environment, VS crashed. When I restart VS, all environments disappeared, VS can no longer detect or add any environments.

How do I add an environment now?

My setup

  • VS: 2015 Professional
  • PTVS: 2.2 comes default with VS
  • Python: Anaconda3-2.3.0-Windows-x86_64
@catusf
Copy link
Author

catusf commented Nov 2, 2015

The screenshot is as below.
capture

@zooba
Copy link
Member

zooba commented Nov 2, 2015

That's a strange crash, but it looks like some files have become corrupted.

Under Programs and Features you should be able to see Python Tools for Visual Studio (even though it was installed with VS). If you run the Repair operation through that there's a good chance it will come back.

@catusf
Copy link
Author

catusf commented Nov 3, 2015

I did it, but issues remain. Even uninstall/reinstall Visual Studio does not help.

@zooba
Copy link
Member

zooba commented Nov 3, 2015

Can you open Tools, Python Tools, Diagnostic Info and post the contents as a gist or to ptvshelp@microsoft.com?

@catusf
Copy link
Author

catusf commented Nov 4, 2015

@zooba
Copy link
Member

zooba commented Nov 4, 2015

Looks like that crash you mentioned managed to save some invalid data into the registry. Every time we reload it, it breaks again and so we fail to load the bits we need to manage custom environments.

You'll need to open Registry Editor and find HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\PythonTools\Interpreters. Beneath this key you should find the info you added last time. You can either delete it and restart VS, or find the invalid path and correct it.

I'll look into making this more robust for our next update so it can't happen accidentally.

@zooba zooba added this to the 2.2.1 milestone Nov 4, 2015
@zooba zooba self-assigned this Nov 4, 2015
zooba added a commit to zooba/PTVS that referenced this issue Nov 4, 2015
Switch to non-throwing function for path processing.
Corrects detection of ability to launch interpreter.
zooba added a commit that referenced this issue Nov 5, 2015
Fixes #944 All environments disappeared
@catusf
Copy link
Author

catusf commented Nov 5, 2015

I deleted the key, and it works like a charm. Thanks so much.

@catusf catusf closed this as completed Nov 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants