Title: Crash after uninstalling package (ptvs) · Issue #576 · microsoft/python-language-server · GitHub
Open Graph Title: Crash after uninstalling package (ptvs) · Issue #576 · microsoft/python-language-server
X Title: Crash after uninstalling package (ptvs) · Issue #576 · microsoft/python-language-server
Description: Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\huvalo\source\repos\OpenFolderMixed\env\Lib\site-packages\cookies.py'. at System.IO.__Error....
Open Graph Description: Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\huvalo\source\repos\OpenFolderMixed\env\Lib\site-pac...
X Description: Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\huvalo\source\repos\OpenFolderMixed\env\Lib\s...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/576
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash after uninstalling package (ptvs)","articleBody":"```\r\nUnhandled Exception: System.AggregateException: One or more errors occurred. ---\u003e System.IO.FileNotFoundException: Could not find file 'C:\\Users\\huvalo\\source\\repos\\OpenFolderMixed\\env\\Lib\\site-packages\\cookies.py'.\r\n at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)\r\n at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)\r\n at Microsoft.PythonTools.Interpreter.Ast.PythonModuleLoader.FromFile(IPythonInterpreter interpreter, String sourceFile, PythonLanguageVersion langVersion, String moduleFullName) in E:\\A\\_work\\512\\s\\src\\Analysis\\Engine\\Impl\\Interpreter\\Ast\\PythonModuleLoader.cs:line 39\r\n at Microsoft.PythonTools.Interpreter.Ast.AstModuleResolution.ImportFromSearchPaths(String name, PathResolverSnapshot pathResolver) in E:\\A\\_work\\512\\s\\src\\Analysis\\Engine\\Impl\\Interpreter\\Ast\\AstModuleResolution.cs:line 320\r\n at Microsoft.PythonTools.Interpreter.Ast.AstModuleResolution.\u003cTryImportModuleAsync\u003ed__17.MoveNext() in E:\\A\\_work\\512\\s\\src\\Analysis\\Engine\\Impl\\Interpreter\\Ast\\AstModuleResolution.cs:line 204\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.PythonTools.Interpreter.Ast.AstPythonInterpreter.\u003cImportModuleAsync\u003ed__33.MoveNext() in E:\\A\\_work\\512\\s\\src\\Analysis\\Engine\\Impl\\Interpreter\\Ast\\AstPythonInterpreter.cs:line 135\r\n --- End of inner exception stack trace ---\r\n at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n at Microsoft.PythonTools.Interpreter.Ast.AstPythonInterpreter.ImportModule(String name) in E:\\A\\_work\\512\\s\\src\\Analysis\\Engine\\Impl\\Interpreter\\Ast\\AstPythonInterpreter.cs:line 167\r\n at Microsoft.PythonTools.Analysis.ModuleTable.Reload() in E:\\A\\_work\\512\\s\\src\\Analysis\\Engine\\Impl\\ModuleTable.cs:line 131\r\n at Microsoft.Python.LanguageServer.Implementation.Server.Interpreter_ModuleNamesChanged(Object sender, EventArgs e) in E:\\A\\_work\\512\\s\\src\\LanguageServer\\Core\\Impl\\Implementation\\Server.cs:line 402\r\n at Microsoft.PythonTools.Analysis.PythonAnalyzer.\u003cReloadModulesAsync\u003ed__26.MoveNext() in E:\\A\\_work\\512\\s\\src\\Analysis\\Engine\\Impl\\PythonAnalyzer.cs:line 151\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Python.LanguageServer.Implementation.Server.ReloadModulesQueueItem.Analyze(CancellationToken cancel) in E:\\A\\_work\\512\\s\\src\\LanguageServer\\Core\\Impl\\Implementation\\Server.cs:line 58\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Python.LanguageServer.Implementation.Server.\u003cReloadModulesAsync\u003ed__50.MoveNext() in E:\\A\\_work\\512\\s\\src\\LanguageServer\\Core\\Impl\\Implementation\\Server.cs:line 272\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()\r\n at System.Threading.ThreadPoolWorkQueue.Dispatch()\r\n}\r\n```\r\n\r\nHere's a simple repro:\r\n\r\nCreate new bottle application\r\nClick Create when prompted to create a virtual env\r\nMake sure you have app.py open, where there's an `import bottle`\r\nWait for virtual env creation/installation to complete\r\nClick on Manage Packages on the python toolbar, click X to uninstall bottle.\r\n\r\nResult: analyzer process crashes\r\n","author":{"url":"https://github.com/huguesv","@type":"Person","name":"huguesv"},"datePublished":"2019-02-04T03:32:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/576/python-language-server/issues/576"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:166731c6-ac5d-d71b-dbea-e840b3f92a7a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93B4:A56AD:64D6CD:9406B3:6A4E1082 |
| html-safe-nonce | 74f76b3af2c21aad30894cfd0489f93e5800041d6a1d9fa011e0cf1842f0ef9d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0I0OkE1NkFEOjY0RDZDRDo5NDA2QjM6NkE0RTEwODIiLCJ2aXNpdG9yX2lkIjoiMTc3OTY3MDQwNzI2NDk5NzUwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 67ea3919020314ecc968f5358fe3c62ac79a7cb60615ce49d8d1475664e2a7d2 |
| hovercard-subject-tag | issue:406170665 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/python-language-server/576/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae5cc8199ab61352893eaa6c3ea8679a289c8d5af07640e355237c307ff63bee/microsoft/python-language-server/issues/576 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae5cc8199ab61352893eaa6c3ea8679a289c8d5af07640e355237c307ff63bee/microsoft/python-language-server/issues/576 |
| og:image:alt | Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\huvalo\source\repos\OpenFolderMixed\env\Lib\site-pac... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | huguesv |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 145901977 |
| octolytics-dimension-repository_nwo | microsoft/python-language-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145901977 |
| octolytics-dimension-repository_network_root_nwo | microsoft/python-language-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 51470c353b8a1f52a88d3e3cc2014b17ab8cc1ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width