Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in authentication #74

Open
danielmockaitis opened this issue Feb 16, 2022 · 1 comment
Open

Error in authentication #74

danielmockaitis opened this issue Feb 16, 2022 · 1 comment

Comments

@danielmockaitis
Copy link

Hi there,

I'm getting the following error when just using the basic Domo = Domo(client_id, client_secret, api..) Looks like there is something wrong with the Json parsing?

Traceback (most recent call last): File "/usr/local/bin/flask", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 994, in main cli.main(args=sys.argv[1:]) File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 600, in main return super().main(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 849, in run_command app = DispatchingApp(info.load_app, use_eager_loading=eager_loading) File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 324, in __init__ self._load_unlocked() File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 350, in _load_unlocked self._app = rv = self.loader() File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 406, in load_app app = locate_app(self, import_name, name) File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 260, in locate_app __import__(module_name) File "/Users/mock/dev/csg/python-flask-meevo-adp-api/app.py", line 10, in <module> domo = Domo(config.DOMO_CLIENT_ID, config.DOMO_CLIENT_SECRET, api_host='cambridgespa.domo.com') File "/usr/local/lib/python3.7/site-packages/pydomo/__init__.py", line 90, in __init__ self.transport = DomoAPITransport(client_id, client_secret, api_host, kwargs.get('use_https', True), self.logger, request_timeout = timeout) File "/usr/local/lib/python3.7/site-packages/pydomo/Transport.py", line 21, in __init__ self._renew_access_token() File "/usr/local/lib/python3.7/site-packages/pydomo/Transport.py", line 86, in _renew_access_token self.access_token = response.json()['access_token'] File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/Cellar/[email protected]/3.7.10_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/usr/local/Cellar/[email protected]/3.7.10_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/Cellar/[email protected]/3.7.10_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@danielmockaitis
Copy link
Author

Sorry new to this SDK, realize I need to use Domo as the api_host='api.domo.com'.

However, seems there should be a better error message here than the JSON parsing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant