Iām getting what looks like a JSON parsing error when trying to run the redash-toolkit cloning script. Any ideas whatās going on here and/or how to fix it?
% python3 -m redash_toolbelt.examples.clone_dashboard_and_queries http://redash.blahblah.com campaign-insights clone
API Key: XXXXXXXXXXXX
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/sam/redash-toolbelt/redash_toolbelt/examples/clone_dashboard_and_queries.py", line 84, in <module>
main()
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/sam/redash-toolbelt/redash_toolbelt/examples/clone_dashboard_and_queries.py", line 80, in main
duplicate(client, slug, prefix)
File "/Users/sam/redash-toolbelt/redash_toolbelt/examples/clone_dashboard_and_queries.py", line 31, in duplicate
old_vs_new_query_pairs = [
File "/Users/sam/redash-toolbelt/redash_toolbelt/examples/clone_dashboard_and_queries.py", line 34, in <listcomp>
"new_query": client.duplicate_query(
File "/Users/sam/redash-toolbelt/redash_toolbelt/client.py", line 76, in duplicate_query
new_query = response.json()
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/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)