Closed ablot closed 1 year ago
Same for post
For instance json fields cannot contain dots. This happened for csv file dictionnary:
harpmessage: attributes: binary_file: harpmessage.bin csv_files: FrameLog: FrameLog.csv NewParams: NewParams.csv PZAH8.2f_S20221206_R170430_Retinotopy_Motion_00001: PZAH8.2f_S20221206_R170430_Retinotopy_Motion_00001.csv
The dot in PZAH8.2f is an issue.
Catch error with invalid bson, see if it can be automatically fixed or at least try to explain what the error is. Maybe parse yaml for such errors beforehand?
Actually it's more complex. There are more restriction on filed names of MongoDB than json (dots for instance) https://www.mongodb.com/docs/manual/reference/limits/#Restrictions-on-Field-Names
For now remove all but dot and keep that open. Let's look more precisely if it creeps up again.
That should be mostly fixed. There can be issue remaining if someone tries to upload any other object but that might warrant another issue if it becomes annoying
Setting extra attributes to some non JSON value triggers crash. Clean or give the option to clean