Intellisense not working

Mar 11 at 2:20 PM
I've installed python 3.3, vs2013, ptvs 2.0, and didn't disable any configurations during installation.

Intellisense works for import statements, and had been working partially for the wxPython package I had installed. However, once the Python Environments tab indicated this completion DB was up to date all intellisense but the import statements STOPPED working.

import os <--- intellisense
os. <---- nothing

I've deleted the DB and regenerated, and reinstalled ptvs 2.0 with no luck. Any suggestions?
Coordinator
Mar 11 at 3:31 PM
Under the Tools menu, you'll find a command Python Tools->Diagnostic Info. If you could copy this into a text file and email it to ptvshelp@microsoft.com, we'll be able to take a look and see if something has gone wrong there.

This is very unusual - about the only idea I have right now is deleting the database and regenerating it (it's in C:\Users\<your name>\AppData\Local\Python Tools, and you can just delete the whole Python Tools folder). Hopefully the diagnostic info will help me come up with some better ideas.
Mar 11 at 5:21 PM
I'll try reinstalling everything again and be a little more extensive with my wiping, as well as gathering diagnostics information if the problem persists. It definitely seems as though it's specific to my configuration. Thanks.
Coordinator
Mar 11 at 6:13 PM
Reinstallation probably isn't going to make a difference here - unless VS is crashing regularly then it has installed properly.

Can you send the logs I mentioned earlier?
Mar 12 at 12:29 PM
Edited Mar 12 at 1:35 PM
I've e-mailed the logs. There is indeed references to errors, such as:

2014-03-11T110801 [WARNING] File CPython33liblib2to3testsdatabom.py contained parse errors
2014-03-11T110801 (2,7) - (2,18) invalid syntax

2014-03-11T110801 [WARNING] File CPython33libtestbadsyntax_3131.py contained parse errors
2014-03-11T110801 (2,1) - (2,2) unexpected token '€'

It seems that the parser is getting hung up on some bad syntax. Is there a typical way of resolving these issues?

Edit: Just realized I put the contents into the e-mail body as opposed to an attached document. Hope that wasn't a bother.

Edit2: I've temporarily removed the test and lib2to3 folders from the search path, and while it hasn't removed all errors from the diagnostic output, it has dramatically improved the intellisense. However, it still seems as though the intellisense is failing to complete. The wx namespace has no entry for the Frame object, yet after creating one and using the dot operator on it I see entries for doc and a couple other members, but nothing more. It's as if it's an unknown generic python object.

I've tried changing my search path from site-packages to site-packages\wx, and while the code still functions this dramatically reduced the entries available in the intellisense drop down, and they did not appear correct. I've since reverted to referencing the entire site-packages folder.
Coordinator
Mar 12 at 4:16 PM
Referencing the entire site-packages in your search path is not a good idea. We run a background analysis on these and cache the results because they can take a long time to analyze (~5 minutes in your case) - adding it as a search path may force us to reanalyze each time you type, which is going to make your experience really bad. (We will also ignore .pyd files in the search path - technically this is a bug, but it is the current behaviour - which is why the wx IntelliSense won't look so good.)

If you had the search path set when you first encountered the issue, try removing the search path. You may need to restart VS afterwards to ensure we clear out our in-memory caches, but that may have been the problem all along. Our completion DB is finding your site-packages folder fine on its own (not always the case, but it is this time).

The parse errors you see are expected. There are a number of tests in the standard library that deliberately include errors. I don't see any here that aren't deliberate, and they should not affect our IntelliSense.

Your analysis of wx.Frame is correct - we're treating it as object. The search paths won't be helping here, but I don't see any reason in the logs why we don't have more information available.

Have you tried deleting your C:\Users\<your name>\AppData\Local\Python Tools folder and refreshing the DB? If so and it still doesn't work, can you zip up that folder and share it with us? (Preferably on Dropbox/OneDrive/etc. and email a public link to ptvshelp@microsoft.com.) This is quite an unusual failure and I'm very interested to figure out what's going wrong.
Mar 13 at 1:12 PM
It would seem the problems are resolved. After removing site-packages from the search paths, deleting the completion DB, restarting VS, and regenerating the DB, it seems the intellisense is working for my wx package as well as to be expected. I now actually see 'Frame' appear after 'wx.' for the first time ever, although it lacks any information about the object itself (presumably due to the .pyd issue you mentioned).

So to the best of my knowledge all of my issues were caused by having <python>\lib\site-packages in my search paths, and the varying intellisense behavior I witnessed was due to the attempts at changing the search paths to other erroneous values (i.e. specific package folders within site-packages) and regenerating the completion DB file without restarting VS itself.

Despite my issues PTVS is fantastic, as has been the support. Thanks, and let me know if there's anything I can do to further your understanding of exactly what happened.
Coordinator
Mar 13 at 3:24 PM
I think I understand what happened here, the question is how to save people in the future from going through the same trouble as you did.

We can probably quite reasonably display a warning if a search path is not helpful - maybe put an exclamation mark on the item in Solution Explorer or add something to the error list. I've created a feature request to track this.

Thanks for being willing to work through it with us.