FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

BadSourceException · Issue #2501 · microsoft/vscode-python · GitHub

BadSourceException #2501

Description

Environment data

  • VS Code version: 1.27.1
  • Extension version (available under the Extensions sidebar): 2018.8.0
  • OS and version: Ubuntu 18.04.1
  • Python version (& distribution if applicable, e.g. Anaconda): 2.7.15rc1
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
  • Relevant/affected Python packages and their versions:

Actual behavior

After language server reloads modules server starts crashing with BadSourceException, it restarts itself and after a few cycles it stops restarting completely.

Expected behavior

Normal behaviour.

Steps to reproduce:

1- Open python file.
2- Edit it normally.
3- Wait for extension to crash.

Logs

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

Reloading modules...

Unhandled Exception: Microsoft.PythonTools.Parsing.BadSourceException: Exception of type 'Microsoft.PythonTools.Parsing.BadSourceException' was thrown.
   at Microsoft.PythonTools.Interpreter.Ast.AstPythonInterpreter.ImportModule(String name)
   at Microsoft.PythonTools.Interpreter.Ast.AstNestedPythonModule.GetModule()
   at Microsoft.PythonTools.Interpreter.Ast.AstNestedPythonModule.GetChildrenModules()
   at Microsoft.PythonTools.Analysis.ModuleTable.ReInit()
   at Microsoft.PythonTools.Analysis.LanguageServer.Server.Interpreter_ModuleNamesChanged(Object sender, EventArgs e)
   at Microsoft.PythonTools.Interpreter.Ast.AstPythonInterpreterFactory.NotifyImportNamesChanged()
   at Microsoft.PythonTools.Analysis.PythonAnalyzer.ReloadModulesAsync(CancellationToken token)
   at Microsoft.PythonTools.Analysis.LanguageServer.Server.ReloadModulesQueueItem.Analyze(CancellationToken cancel)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.PythonTools.Analysis.LanguageServer.Server.ReloadModulesAsync(CancellationToken token)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
[Info  - 3:42:56 PM] Connection to server got closed. Server will restart.
Initializing for /home/cllamach/.virtualenvs/panopta_env/bin/python

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL