1

Closed

No intellisense on 3rd party packages (django)

description

I have Django installed and working - python sees it and my app works just fine. It's registered in the C:\Program Files (x86)\Python27\Lib\site-packages using a .pth file. But, PTVS (1.1 beta1) does not provide any intellisense for any
of the django classes. I have also tried setting the search path inside the project. The contents of C:\Users\<user>\AppData\Local\Python Tools\CompletionDB\2af0f10d-7135-4994-9156-5d01c9c11b7e\2.7 does not contain any of the django
classes and the AnalysisLog.txt log shows no errors. According to
work item 23 and
work item 160, PTVS should be picking up this package but it seems to be ignoring it completely.

I finally had to just copy the entire django source tree into my C:\Program Files (x86)\Python27\Lib\site-packages folder. Then "Generate Completion Database" picked up the classes and all works as it should.

file attachments

Closed Feb 14 at 5:43 PM by Zooba

comments

dinov wrote Jan 3, 2012 at 10:27 PM

Thanks for the report, it looks like we were looking in the wrong spot for .pth files (everywhere except site-packages!). I've fixed this w/ this change so it'll be in the next release: http://pytools.codeplex.com/SourceControl/changeset/changes/1bcc30dd26e0

A different workaround than copying all of Django would be to copy the .pth files from site-packages to Lib and then we'd pick them up from there, but you'd need to update any relative paths in there.

Odwalla wrote Jan 31, 2012 at 1:30 PM

Was this fix pushed out with 1.1 RC last week? I'm still not seeing Intellisense for wxPython.

dinov wrote Jan 31, 2012 at 4:49 PM

Yes, it should be fixed. If you go into Tools->Options->Python Tools->Interpreter Options and regenerate the completion database do they eventually show up (this could take a little while)? If not can you get the info in Tools->Python Tools->Diagnostic Info and attach it here?

Odwalla wrote Feb 1, 2012 at 1:22 PM

Rebuilding the db didn't appear to help. I've posted my diagnostics.

dinov wrote Feb 2, 2012 at 6:03 AM

Thanks, it looks like we correctly found wxPython but before we got to it the analysis failed part way through. It could be something related to Psycho, or maybe something we analyzed earlier. I'll try and setup a repro.

dinov wrote Feb 6, 2012 at 7:51 PM

I've added a work around for 1.1 final - http://pytools.codeplex.com/SourceControl/changeset/changes/19ad30db1f9a

If you're setup to build from source and can try this in a debug build that'd be great. I wasn't able to repro it but the debug build will pop an assertion when this happens. Either way we should be able to successfullly continue the analysis now.

Odwalla wrote Feb 8, 2012 at 12:08 AM

I'm in China currently. I tried downloading the Ultimate installer, but at a measley 38kb/sec I quickly realized that attempting to get all of the SDKs and pre-reqs to build from source would be folly. the Ultimate preview has already timed out on my desktop back home, also. I guess I'll wait until the next RC release from you.

Odwalla wrote Feb 16, 2012 at 9:37 PM

With the 1.1 release on 2/10 and a rebuild of the completion database my work machine now correctly offers auto complete suggestions for wxPython. Thanks for fixing this!

dinov wrote Feb 16, 2012 at 10:21 PM

Great, if you see any other places w/ missing completions let us know. I've run into a few w/ PyGame recently and I'm trying to improve our completions against pyd's.

linearz wrote Feb 19, 2012 at 7:57 AM

I'm having problem PySide, the Intellisense is not working at all. It is using pyd too.

dinov wrote Feb 20, 2012 at 4:29 PM

linearz: Is there anything in particular that's not working? I tried it out on the current builds (post 1.1) and it seems reasonable in that I can do:
import PySide
PySide.QtGui.QComboBox().addItem

And I get completions up to and including for the "addItem" call. The signature help generally doesn't work but that's because PyQt is the pyd's for PyQt don't have any doc strings which we can parse.

linearz wrote Feb 21, 2012 at 6:34 AM

I'm using PySide-1.1.0qt474.win32-py2.6.exe and attached are the screenshot. It only detects QtCore.

mcdevitts wrote Feb 8 at 4:08 AM

We've recently been using wxPython with PyTools and have run into a snag. While we do get some intellisense prompts, the choices seem to be missing any inherited methods or members. For instance:

After creating a wxChoice object. We cannot see any methods that it would inherit from it's parent (wxWindow). This is a severe limitation and prevents us from using an otherwise amazing tool. I hope you can fix this soon!

Zooba wrote Feb 8 at 2:48 PM

This issue was fixed over a year ago (and it should really have been closed by now...).

If you're still having problems, please open a new issue. Also, if you can open Tools->Python Tools->Diagnostic Information and attach the info to the issue, that will save us from having to ask so many questions about your setup.