LAAC-LSCP / ChildProject

Python package for the management of day-long recordings of children.
https://childproject.readthedocs.io
MIT License
13 stars 5 forks source link

zooniverse upload fails when chunks csv file doesn't have "dataset" column #433

Closed khitczenko closed 1 year ago

khitczenko commented 1 year ago

Is your feature request related to a problem? Please describe. I tried to upload subjects to Zooniverse from a chunks file that doesn't have a "dataset" column and got the following error: "TypeError: Object of type NAType is not JSON serializable"

Describe the solution you'd like From Loann: "I made it so newly generated chunk csv should include (a dataset column), that way we always have a link to the original dataset (and can upload that info to zooniverse as metadata). But in old generated csv, it is not there, so I replace it with NA, which apparently cannot be put in JSON, so lets try using empty string instead"

LoannPeurey commented 1 year ago

https://github.com/LAAC-LSCP/ChildProject/blob/0974ea43ec7889074b3be1eb1734012755bca52f/ChildProject/pipelines/zooniverse.py#L468

replace pd.NA with ""