Title: Invalid cast from BuiltinFunctionInfo to BuiltinClassInfo in GetBuiltinType · Issue #470 · microsoft/python-language-server · GitHub
Open Graph Title: Invalid cast from BuiltinFunctionInfo to BuiltinClassInfo in GetBuiltinType · Issue #470 · microsoft/python-language-server
X Title: Invalid cast from BuiltinFunctionInfo to BuiltinClassInfo in GetBuiltinType · Issue #470 · microsoft/python-language-server
Description: From #391: [Error - 5:37:55 PM] System.InvalidCastException: Unable to cast object of type 'Microsoft.PythonTools.Analysis.Values.BuiltinFunctionInfo' to type 'Microsoft.PythonTools.Analysis.Values.BuiltinClassInfo'. at Microsoft.PythonT...
Open Graph Description: From #391: [Error - 5:37:55 PM] System.InvalidCastException: Unable to cast object of type 'Microsoft.PythonTools.Analysis.Values.BuiltinFunctionInfo' to type 'Microsoft.PythonTools.Analysis.Values...
X Description: From #391: [Error - 5:37:55 PM] System.InvalidCastException: Unable to cast object of type 'Microsoft.PythonTools.Analysis.Values.BuiltinFunctionInfo' to type 'Microsoft.PythonTools.Ana...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/470
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invalid cast from BuiltinFunctionInfo to BuiltinClassInfo in GetBuiltinType","articleBody":"From #391:\r\n\r\n```\r\n[Error - 5:37:55 PM] System.InvalidCastException: Unable to cast object of type 'Microsoft.PythonTools.Analysis.Values.BuiltinFunctionInfo' to type 'Microsoft.PythonTools.Analysis.Values.BuiltinClassInfo'.\r\n at Microsoft.PythonTools.Analysis.PythonAnalyzer.GetBuiltinType(IPythonType type)\r\n at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()\r\n at System.Collections.Generic.List`1.AddEnumerable(IEnumerable`1 enumerable)\r\n at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)\r\n at Microsoft.PythonTools.Analysis.Values.Mro..ctor(IEnumerable`1 values)\r\n at Microsoft.PythonTools.Analysis.Values.BuiltinClassInfo.get_Mro()\r\n at Microsoft.PythonTools.Analysis.Values.Mro.Recompute()\r\n at Microsoft.PythonTools.Analysis.Values.ClassInfo.SetBases(IEnumerable`1 bases)\r\n at Microsoft.PythonTools.Analysis.ClassAnalysisUnit.AnalyzeWorker(DDG ddg, CancellationToken cancel)\r\n at Microsoft.PythonTools.Analysis.Analyzer.DDG.Analyze(Deque`1 queue, CancellationToken cancel, Action`1 reportQueueSize, Int32 reportQueueInterval)\r\n at Microsoft.PythonTools.Analysis.PythonAnalyzer.AnalyzeQueuedEntries(CancellationToken cancel)\r\n at Microsoft.PythonTools.Intellisense.AnalysisQueue.GroupAnalysis.Analyze(CancellationToken cancel)\r\n at Microsoft.PythonTools.Intellisense.AnalysisQueue.HandleAnalyzable(IAnalyzable item, AnalysisPriority priority, CancellationToken cancellationToken)\r\n at Microsoft.PythonTools.Intellisense.AnalysisQueue.ConsumerLoop()\r\n```\r\n\r\n#439 changed a bunch of the MRO stuff, and that PR's timing lines up with when @jarshwah saw this.\r\n\r\nIt seems to me like either:\r\n- We now add more things to the MRO, which the (older) GetBuiltinType method needs to better handle.\r\n- The check in GetBuiltinType is correct, and the new code adds things it shouldn't to the MRO.","author":{"url":"https://github.com/jakebailey","@type":"Person","name":"jakebailey"},"datePublished":"2018-12-08T19:32:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/470/python-language-server/issues/470"}
| 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:ea2002b9-5326-a351-2889-a177f16110b7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8610:179658:315C20:48DE74:6A4E03F6 |
| html-safe-nonce | 5bed69a70bc517a5fd56c800ccb0687cae29195295cbe9073c841c70d18074ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjEwOjE3OTY1ODozMTVDMjA6NDhERTc0OjZBNEUwM0Y2IiwidmlzaXRvcl9pZCI6IjM3MTc0MzkxNjc2NjkyMTcxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9c03ef7241f6bc691be9ecfe03046b96250d9754496774de2712d198e95737b2 |
| hovercard-subject-tag | issue:388952076 |
| 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/470/issue_layout |
| twitter:image | https://opengraph.githubassets.com/042b6f11c39dc73a04a350012f333b5885c5bcc0055c743caf75b53deaaa1de6/microsoft/python-language-server/issues/470 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/042b6f11c39dc73a04a350012f333b5885c5bcc0055c743caf75b53deaaa1de6/microsoft/python-language-server/issues/470 |
| og:image:alt | From #391: [Error - 5:37:55 PM] System.InvalidCastException: Unable to cast object of type 'Microsoft.PythonTools.Analysis.Values.BuiltinFunctionInfo' to type 'Microsoft.PythonTools.Analysis.Values... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jakebailey |
| 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 | 52bde38e24398476f8eb1e0760c81346c6a00812 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width