I am using the OptimadeRester to retrieve data from the COD. But I am seeing that the implementation gets the first 10 entries from the COD API response, and then it raises an error with ‘failed to parse returned data ‘species_at_sites’’. Which is something that does not happen when I query the MaterialsProject for example.
Checking a bit more in detail I see that when querying the materials project the response is the following:
But the pymatgen class does not code it as such. But in any case the ‘next’ link should include the original query parameters right? Maybe I am not correct in this.
Just a small, comment, I will not post it in the Github page because it is a quite workaround solution that Saulius Gražulis suggested to me.
It is possible to manually attach the ‘response_fields’ to every ‘next’ URL; this should also work in the future, even if the ‘next’ URL will get a copy of its own ‘response_fields’, since, duplicated QS parameter is not an error. Or you can check of the ‘response_fields’ is already present.