Can't open any .py files.

Oct 10, 2011 at 11:27 PM

I get the error message "Visual Studio has encountered an exception. This may be caused by an extension."  It then proceeds to tell me I can get more information in the ActivityLog.xml file if I enable logging with the "/log" parameter.  I did and got the errors listed below.  The files I've been trying to open are blank django files like views.py and models.py.  The only thing besides a comment in models.py is "from django.db import models".  Views.py is just a comment.

I uninstalled and re-installed python tools but I still have the problem. I have no clue on how to fix it except maybe uninstall and re-install everything.  Any help would be appreciated.

 

214 ERROR System.Runtime.InteropServices.InvalidOleVariantTypeException: invalid opcode: 99 at Microsoft.PythonTools.Intellisense.Unpickle.UnpicklerObject.Load() at Microsoft.PythonTools.Interpreter.Default.CPythonModule.EnsureLoaded() at Microsoft.PythonTools.Interpreter.Default.CPythonBuiltinModule.GetAnyMember(String name) at Microsoft.PythonTools.Interpreter.Default.CPythonInterpreter.GetBuiltinType(BuiltinTypeId id) at Microsoft.PythonTools.PyAnalysis.KnownTypes..ctor(PythonAnalyzer state) at Microsoft.PythonTools.Analysis.PythonAnalyzer..ctor(IPythonInterpreter pythonInterpreter, PythonLanguageVersion langVersion) at Microsoft.PythonTools.Intellisense.ProjectAnalyzer..ctor(IPythonInterpreter interpreter, IPythonInterpreterFactory factory, IPythonInterpreterFactory[] allFactories, IErrorProviderFactory errorProvider, PythonProjectNode project) at Microsoft.PythonTools.PythonToolsPackage.CreateAnalyzer() at Microsoft.PythonTools.Extensions.GetAnalyzer(ITextBuffer buffer) at Microsoft.PythonTools.Extensions.GetAnalyzer(ITextView textView) at Microsoft.PythonTools.Intellisense.IntellisenseControllerProvider.TryCreateIntellisenseController(ITextView textView, IList`1 subjectBuffers) at Microsoft.VisualStudio.Language.Intellisense.Implementation.IntellisenseManagerConnectionListener.<>c__DisplayClass5.<SubjectBuffersConnected>b__1(IIntellisenseControllerProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)

Editor or Editor Extension 2011/10/10 23:20:12.251
215 ERROR System.Collections.Generic.KeyNotFoundException: Key property not found at Microsoft.PythonTools.Analysis.Values.BuiltinNamespace`1.get_Item(String name) at Microsoft.PythonTools.Analysis.PythonAnalyzer..ctor(IPythonInterpreter pythonInterpreter, PythonLanguageVersion langVersion) at Microsoft.PythonTools.Intellisense.ProjectAnalyzer..ctor(IPythonInterpreter interpreter, IPythonInterpreterFactory factory, IPythonInterpreterFactory[] allFactories, IErrorProviderFactory errorProvider, PythonProjectNode project) at Microsoft.PythonTools.PythonToolsPackage.CreateAnalyzer() at Microsoft.PythonTools.Extensions.GetAnalyzer(ITextBuffer buffer) at Microsoft.PythonTools.PythonClassifier.GetTokenizer() at Microsoft.PythonTools.PythonClassifier.GetClassificationSpans(SnapshotSpan span) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.<GetTags>d__0.MoveNext() at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__16.MoveNext()

Editor or Editor Extension 2011/10/10 23:20:12.287
216 ERROR System.Collections.Generic.KeyNotFoundException: Key property not found at Microsoft.PythonTools.Analysis.Values.BuiltinNamespace`1.get_Item(String name) at Microsoft.PythonTools.Analysis.PythonAnalyzer..ctor(IPythonInterpreter pythonInterpreter, PythonLanguageVersion langVersion) at Microsoft.PythonTools.Intellisense.ProjectAnalyzer..ctor(IPythonInterpreter interpreter, IPythonInterpreterFactory factory, IPythonInterpreterFactory[] allFactories, IErrorProviderFactory errorProvider, PythonProjectNode project) at Microsoft.PythonTools.PythonToolsPackage.CreateAnalyzer() at Microsoft.PythonTools.Extensions.GetAnalyzer(ITextBuffer buffer) at Microsoft.PythonTools.PythonClassifier.GetTokenizer() at Microsoft.PythonTools.PythonClassifier.GetClassificationSpans(SnapshotSpan span) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.<GetTags>d__0.MoveNext() at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__16.MoveNext()

Editor or Editor Extension 2011/10/10 23:20:12.416

 

Coordinator
Oct 11, 2011 at 1:33 AM

Do you have Python 2.4 installed?  2.4 isn't supported but we incorrectly pick it up and try and analyze it.  If it's set to your default interpreter we'll crashwhen trying to load the corrupted intellisense database.

You should be able to fix this by going to Tools->Options->Python Tools->Interpreter Options and changing the default interpreter to something other than 2.4. 

This is already fixed in 1.1 in that we won't crash on corrupt databases and will no longer recognize 2.4 installs as being valid.

Oct 11, 2011 at 4:59 PM
Thanks dinov! That fixed the problem. That was easy.

On Mon, Oct 10, 2011 at 6:33 PM, dinov <notifications@codeplex.com> wrote:

From: dinov

Do you have Python 2.4 installed? 2.4 isn't supported but we incorrectly pick it up and try and analyze it. If it's set to your default interpreter we'll crashwhen trying to load the corrupted intellisense database.

You should be able to fix this by going to Tools->Options->Python Tools->Interpreter Options and changing the default interpreter to something other than 2.4.

This is already fixed in 1.1 in that we won't crash on corrupt databases and will no longer recognize 2.4 installs as being valid.

Read the full discussion online.

To add a post to this discussion, reply to this email (pytools@discussions.codeplex.com)

To start a new discussion for this project, email pytools@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com