PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Error opening python 3.13 interactive window

Open dr-smc opened this issue 5 months ago • 1 comments

[Window Title] devenv.exe

[Main Instruction] An unexpected error occurred

[Content] An error occurred opening this interactive window.

Please press Ctrl+C to copy the contents of this dialog and report this error to our issue tracker.

[^] Hide details [Close]

[Expanded Information]

Build: 17.0.25225.1

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'StreamJsonRpc.JsonRpc'.
   at Microsoft.Verify.NotDisposed(IDisposableObservable disposedValue, String message)
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__172`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.LanguageServerClient.PythonLanguageClient.<NotifyWithParametersAsync>d__80.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.LanguageServerClient.ReplDocument.<InitializeAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Repl.PythonCommonInteractiveEvaluator.<InitializeLanguageServerAsync>d__61.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Repl.PythonCommonInteractiveEvaluator.<InitializeAsync>d__129.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Repl.SelectableReplEvaluator.<DoInitializeAsync>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.PythonTools.Infrastructure.TaskExtensions.ReThrowTaskException(Object state)
   at Microsoft.PythonTools.Infrastructure.TaskExtensions.DoNotWait(Task task)
   at Microsoft.PythonTools.Repl.SelectableReplEvaluator.SetEvaluator(String id)
   at Microsoft.PythonTools.Repl.SelectableReplEvaluator.InitializeAsync()
   at Microsoft.VisualStudio.InteractiveWindow.InteractiveWindow.<Microsoft-VisualStudio-InteractiveWindow-IInteractiveWindow-InitializeAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.PythonTools.Infrastructure.TaskExtensions.ReThrowTaskException(Object state)
   at Microsoft.PythonTools.Infrastructure.TaskExtensions.DoNotWait(Task task)
   at Microsoft.PythonTools.Repl.InteractiveWindowProvider.CreateInteractiveWindowInternal(IInteractiveEvaluator evaluator, IContentType contentType, Boolean alwaysCreate, Int32 id, String title, Guid languageServiceGuid, String replId)
   at Microsoft.PythonTools.Repl.InteractiveWindowProvider.Create(String replId, Int32 curId)
   at Microsoft.PythonTools.Repl.InteractiveWindowProvider.OpenOrCreate(String replId, Func`2 predicate)
   at Microsoft.PythonTools.InterpreterList.InterpreterListToolWindow.OpenInteractiveWindow_Executed(Object sender, ExecutedRoutedEventArgs e)

dr-smc avatar Sep 28 '25 16:09 dr-smc

can't repo.. Can you provide more details? are you opening a new "pyton application" project? does it only happen with python 3.13?

bschnurr avatar Oct 01 '25 21:10 bschnurr