-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Two create_chart errors that disappear when passing additional folder_id argument #61
Comments
Hello @naterattner, thank you for your interest in our work! If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. |
Hello |
Same problem here:
Plus: The Workaround doesn't seem to work anylonger either... |
Hey @clemens-boisseree , the workaround should still work (it does for me). You might want to double-check that the folder id is correct. But if this is definitely still an issue email me in support and we'll see if we can figure it out :) Also @chekos a pull request for the underlying bug. -Elana (from Datawrapper support) |
Hi Elena, |
HI @elanals thank you for the Pull Requests! And apologies all! I somehow managed to miss all the github notifications regarding this. I'll review the PR asap. |
🐛 Bug Report
Hello, I am getting two errors when calling
create_chart
. This very possibly could be my doing something wrong, though I am following the blog post example.Here is what I am calling:
new_chart = dw.create_chart(title = "California's Recently Arrived Immigrants", chart_type = 'd3-bars-stacked', data = dw_data)
And these are the errors:
Error 1:
Chart could not be created, check your authorization credentials (access token)
Error 2:
UnboundLocalError: local variable 'chart_info' referenced before assignment
. I see this error was also referenced in #10.However, when I pass the folder_id argument for
create_chart
, these errors do not appear:new_chart = dw.create_chart(title = "California's Recently Arrived Immigrants", chart_type = 'd3-bars-stacked', data = dw_data, folder_id='64489')
Response is: "New chart d3-bars-stacked created!"
When passing the folder_id argument, the chart does appear in my account, though it does not get created in the specified folder -- it lives in the Datawrapper dashboard under "My Charts."
I was able to create a chart with the Datawrapper API separately from this package though am also seeing some unexpected behavior with folders (can't always move charts to a folder by ID).
🔬 How To Reproduce
Steps to reproduce the behavior:
create_chart
withtitle
,chart_type
, anddata
arguments as done in this notebook.folder_id
argument.Code sample
See above.
Environment
Screenshots
Two error messages:
No error messages:
Chart is created, but in "My Charts," not in the folder specified in the folder_id argument:
📈 Expected behavior
Would expect a new chart to be created in my Datawrapper account and appear in the specified folder ID.
📎 Additional context
Thanks for reading/looking!
The text was updated successfully, but these errors were encountered: