Title: Calling client.list_models() throws an error · Issue #2 · lightdash/python-sdk · GitHub
Open Graph Title: Calling client.list_models() throws an error · Issue #2 · lightdash/python-sdk
X Title: Calling client.list_models() throws an error · Issue #2 · lightdash/python-sdk
Description: Description When calling client.list_models(), it throws the following error: Traceback (most recent call last): File "/Users/bram/Developer/Repositories/python-sdk/bye.py", line 14, in
Open Graph Description: Description When calling client.list_models(), it throws the following error: Traceback (most recent call last): File "/Users/bram/Developer/Repositories/python-sdk/bye.py", line 14, in
X Description: Description When calling client.list_models(), it throws the following error: Traceback (most recent call last): File "/Users/bram/Developer/Repositories/python-sdk/bye.py", line 14, in &...
Opengraph URL: https://github.com/lightdash/python-sdk/issues/2
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Calling client.list_models() throws an error","articleBody":"## Description\n\nWhen calling `client.list_models()`, it throws the following error:\n\n```\nTraceback (most recent call last):\n File \"/Users/bram/Developer/Repositories/python-sdk/bye.py\", line 14, in \u003cmodule\u003e\n print(client.list_models())\n ^^^^^^^^^^^^^^^^^^^^\n File \"/Users/bram/Developer/Repositories/python-sdk/lightdash/client.py\", line 167, in list_models\n return self.models.list() \n ^^^^^^^^^^^^^^^^^^\n File \"/Users/bram/Developer/Repositories/python-sdk/lightdash/models.py\", line 159, in list\n self._ensure_loaded()\n File \"/Users/bram/Developer/Repositories/python-sdk/lightdash/models.py\", line 138, in _ensure_loaded\n models = self._client._fetch_models()\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/Users/bram/Developer/Repositories/python-sdk/lightdash/client.py\", line 154, in _fetch_models\n return [Model.from_api_response(item) for item in response_data]\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/Users/bram/Developer/Repositories/python-sdk/lightdash/client.py\", line 154, in \u003clistcomp\u003e\n return [Model.from_api_response(item) for item in response_data]\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/Users/bram/Developer/Repositories/python-sdk/lightdash/models.py\", line 114, in from_api_response\n type=data[\"type\"],\n ~~~~^^^^^^^^\nKeyError: 'type'\n```\n\n## Reproduction path\n\n1. Initialise a new client\n2. Call `client.list_models()`\n3. It throws an error.","author":{"url":"https://github.com/bramrodenburg","@type":"Person","name":"bramrodenburg"},"datePublished":"2025-02-25T12:11:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/python-sdk/issues/2"}
| 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:32ffe7cd-3dd3-c38a-bae3-8bfe6a96b6ce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE58:243FA0:A2F5CBA:D272BE0:69763FD9 |
| html-safe-nonce | 34e063b2297d7a3780ce3e5991b7b95bfce2260641a803f0943427a2e18b8381 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTU4OjI0M0ZBMDpBMkY1Q0JBOkQyNzJCRTA6Njk3NjNGRDkiLCJ2aXNpdG9yX2lkIjoiNjA2MjgxOTc5NTc5MzIzMTgzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e35f5a38bf109c67701888c53e45902a51c2989fdece9aac20933e1ca1289219 |
| hovercard-subject-tag | issue:2878193706 |
| 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/lightdash/python-sdk/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/985d0fdc1ab9711d882356ca53f79e411185d60acd0650e3f5d23c1ce687e553/lightdash/python-sdk/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/985d0fdc1ab9711d882356ca53f79e411185d60acd0650e3f5d23c1ce687e553/lightdash/python-sdk/issues/2 |
| og:image:alt | Description When calling client.list_models(), it throws the following error: Traceback (most recent call last): File "/Users/bram/Developer/Repositories/python-sdk/bye.py", line 14, in |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bramrodenburg |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6814b4cc7afd45cd6e64525d0cff0e76dd802f315a5b0e55a7abda1d1d070d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/lightdash/python-sdk git https://github.com/lightdash/python-sdk.git |
| octolytics-dimension-user_id | 65912827 |
| octolytics-dimension-user_login | lightdash |
| octolytics-dimension-repository_id | 932695849 |
| octolytics-dimension-repository_nwo | lightdash/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 932695849 |
| octolytics-dimension-repository_network_root_nwo | lightdash/python-sdk |
| 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 | 4ea235bfed58ef16c8a5642b3ac64b74f10c9f52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width