Title: Bug: User model · Issue #239 · Syncano/syncano-python · GitHub
Open Graph Title: Bug: User model · Issue #239 · Syncano/syncano-python
X Title: Bug: User model · Issue #239 · Syncano/syncano-python
Description: when trying to list the users in my instance (see following code) syncano.connect(api_key=API_KEY) users = User.please.list(instance_name=INSTANCE) for user in users: # print(user) print(user.user_key) I get the following error: Tracebac...
Open Graph Description: when trying to list the users in my instance (see following code) syncano.connect(api_key=API_KEY) users = User.please.list(instance_name=INSTANCE) for user in users: # print(user) print(user.user_...
X Description: when trying to list the users in my instance (see following code) syncano.connect(api_key=API_KEY) users = User.please.list(instance_name=INSTANCE) for user in users: # print(user) print(user.user_...
Opengraph URL: https://github.com/Syncano/syncano-python/issues/239
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: User model","articleBody":"when trying to list the users in my instance (see following code)\n\n```\nsyncano.connect(api_key=API_KEY)\nusers = User.please.list(instance_name=INSTANCE)\nfor user in users:\n # print(user)\n print(user.user_key)\n```\n\nI get the following error:\n\n\u003e Traceback (most recent call last):\n\u003e File \"_**syncano_backend/test/test.py\", line 34, in \u003cmodule\u003e\n\u003e for user in users:\n\u003e File \"/usr/local/lib/python3.5/dist-packages/syncano/models/manager.py\", line 812, in iterator\n\u003e yield self.serialize(o)\n\u003e File \"/usr/local/lib/python3.5/dist-packages/syncano/models/manager.py\", line 741, in serialize\n\u003e return model(__properties) if self._serialize else data\n\u003e File \"/usr/local/lib/python3.5/dist-packages/syncano/models/archetypes.py\", line 90, in __init__\n\u003e self.to_python(kwargs)\n\u003e File \"/usr/local/lib/python3.5/dist-packages/syncano/models/archetypes.py\", line 247, in to_python\n\u003e setattr(self, field.name, value)\n\u003e File \"/usr/local/lib/python3.5/dist-packages/syncano/models/fields.py\", line 105, in **set**\n\u003e instance._raw_data[self.name] = self.to_python(value)\n\u003e File \"/usr/local/lib/python3.5/dist-packages/syncano/models/fields.py\", line 524, in to_python\n\u003e return self.rel(_*value)\n\u003e File \"/usr/local/lib/python3.5/dist-packages/syncano/models/classes.py\", line 145, in **new**\n\u003e raise SyncanoValidationError('Field \"instance_name\" is required.')\n\u003e syncano.exceptions.SyncanoValidationError: Field \"instance_name\" is required.\n\nI tested my api key in http://docs.syncano.io/v0.1.1/docs/users-list and it worked. It looks like the python lib cant create a user model object from the response.\n\nCode from the stacktrace\n\n```\n\n def serialize(self, data, model=None):\n \"\"\"Serializes passed data to related :class:`~syncano.models.base.Model` class.\"\"\"\n model = model or self.model\n if data == '':\n return\n\n if isinstance(data, model):\n return data\n\n if not isinstance(data, dict):\n raise SyncanoValueError('Unsupported data type.')\n\n properties = deepcopy(self.properties)\n properties.update(data)\n return model(**properties) if self._serialize else data`\n\n\n```\n","author":{"url":"https://github.com/Eggwise","@type":"Person","name":"Eggwise"},"datePublished":"2016-08-31T23:45:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/239/syncano-python/issues/239"}
| 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:fa415a77-519b-351d-6cb6-0af6f72f913d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DBA6:2F9FBB:157CFBC:1CA9AFE:697C1DE7 |
| html-safe-nonce | d70ed9ea9528372665fbf67869f7f0f9f6fe1eeccd89b78c577eed123d3c0881 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkE2OjJGOUZCQjoxNTdDRkJDOjFDQTlBRkU6Njk3QzFERTciLCJ2aXNpdG9yX2lkIjoiODM3Mjc0MDE1MDYwNTM4OTI4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | da9592f41470ec8cc2b88973ce0e825cab53281fa155c686842c0c8255946508 |
| hovercard-subject-tag | issue:174405137 |
| 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/Syncano/syncano-python/239/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5153c6bd7dec3bed9139634f1a18bd1bedf1f0aed0c753073b490e6d2f7a5d8b/Syncano/syncano-python/issues/239 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5153c6bd7dec3bed9139634f1a18bd1bedf1f0aed0c753073b490e6d2f7a5d8b/Syncano/syncano-python/issues/239 |
| og:image:alt | when trying to list the users in my instance (see following code) syncano.connect(api_key=API_KEY) users = User.please.list(instance_name=INSTANCE) for user in users: # print(user) print(user.user_... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Eggwise |
| hostname | github.com |
| expected-hostname | github.com |
| None | da4f0ee56809799586f8ee546b27f94fe9b5893edfbf87732e82be45be013b52 |
| turbo-cache-control | no-preview |
| go-import | github.com/Syncano/syncano-python git https://github.com/Syncano/syncano-python.git |
| octolytics-dimension-user_id | 6367703 |
| octolytics-dimension-user_login | Syncano |
| octolytics-dimension-repository_id | 16406574 |
| octolytics-dimension-repository_nwo | Syncano/syncano-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16406574 |
| octolytics-dimension-repository_network_root_nwo | Syncano/syncano-python |
| 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 | 787d8d274e314f52ce6d846c7581f9476d8dc736 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width