Datawrapper icon indicating copy to clipboard operation
Datawrapper copied to clipboard

Invalid properties passed to update_meadata break chart

Open robroc opened this issue 4 years ago • 2 comments

🐛 Bug Report

Passing an invalid property to update_metadata is accepted and breaks the chart. Specifically, I passed

dw.update_metadata(dw_id, properties = {'annotate' : 'SAMPLE ANNONATION'})

instead of:

dw.update_metadata(dw_id, properties = {'annotate' : {'notes' : 'SAMPLE ANNONATION'}})

The update was accepted and the corresponding property appeared in chart_properties.

As a result, the chart in the web UI became unusable. In addition, the "Refine" tab on the website vanished.

I suggest adding to the docs a list of valid properties to pass, and offering error messages when invalid ones are passed.

Environment

  • OS: Windows
  • Python version: 3.8.10
  • DW version: 0.4.6

robroc avatar Oct 26 '21 15:10 robroc

Hello @robroc, 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.

github-actions[bot] avatar Oct 26 '21 15:10 github-actions[bot]

thank you for this! and the suggestion!

Apologies for the delay but I'll be working on updating datawrapper in the following weeks! I'm hoping to address this.

chekos avatar Feb 03 '22 18:02 chekos