Substra/substra-backend

Error 400 when adding a dataset

Closed this issue · 3 comments

Requests error status 400: {"message":[{"name":["This field may not be null."]}],"pkhash":"3a768e71c323e3cf62fb43c5fca6b4e8f7f2975bc13972163a8946e7c5ee6b8c"}
substra.sdk.exceptions.InvalidRequest: 400 Client Error: Bad Request for url: http://substra-backend.node-1.com/data_manager/: [{'name': ['This field may not be null.']}]
> /Users/mypath/register_my_dataset.py(119)main()
-> dataset_key = client.add_dataset(DATASET, exist_ok=True)['pkhash']
(Pdb) pp DATASET
{'data_opener': './dataset/opener.py',
 'description': './dataset/description.md',
 'name': 'My Dataset',
 'permissions': {'authorized_ids': [], 'public': True},
 'type': 'csv'}

This error has been reported twice today.
Downgrading to earlier version of the backend and hlf-k8s seems to fix the issue.

Reporting here the result of the investigation by @samlesu, it looks like a sync issue between the releases of the backend and the sdk. Using the master branch of the substra repository solves the issue.

The actual issue is that the latest release of the backend expects all data to arrive in JSON while the latest release of the sdk still sends data a standard form-multipart data.

This should be fixed by a new release in the sdk: Substra/substra#169

@samlesu As Substra/substra#169 fixed the issue, we can close this one ?

Yes, thanks @Kelvin-M. Closing it;