Closed dadada closed 6 years ago
Hi @timschubert , thanks for your pull request.
You are right and there is a bug when you load the experiment JSON file if it contains mobilities or profiles attributes. When you submit an experiment and specify a profile or mobility association with an empty profiles or mobilities JSON attribute the IoT-LAB REST API try to fill them automatically with your profiles or mobilities store.
But originally we also want that you should submit an experiment with a profile not included in your store and put it directly in the JSON profiles attribute. In this case we just verify that you put a valid profile.
So for your fix, rather than delete attributes it might be better to affect them in experiment object (eg. pop of exp_dict) before load_assoc execution if they exist.
What do you think about that ?
Thanks for your help.
Thanks @timschubert. I will merge this pull request and deploy a new Cli-tools version (eg. 2.4.2) on IoT-LAB testbed. Best regards.
Exporting an experiment using the GET method creates a JSON file that contains the fields
profiles
andmobilities
. When_load_assocs
gets called on the arguments obtained from the exported JSON file, these two parameters are passed as additional keyword arguments and a TypeError occurs.This can be reproduced using the example from
experiment-cli load --help