I am playing with pyODK and plptyhon (PostgreSQL python procedural language) and it's promising
I face a problem when I try to get expanded json :
this code is ok (last 10 submissions of the form Sicen_2022
from pyodk.client import Client
client = Client()
client.open()
client.submissions.get_table("Sicen_2022", "5", "Submissions", None, 10, None, None, None)
When I try to use the last parameter to gest expanded json, I face an error :
from pyodk.client import Client
client = Client()
client.open()
client.submissions.get_table("Sicen_2022", "5", "Submissions", None, 10, None, None, "*")
the error message :
PyODKError Traceback (most recent call last)
Cell In[6], line 5
3 client = Client()
4 client.open()
----> 5 client.submissions.get_table("Sicen_2022", "5", "Submissions", None, 10, None, None, '*')
File ~/jupyter/jupyter/lib/python3.8/site-packages/pyodk/endpoints/submissions.py:163, in SubmissionService.get_table(self, form_id, project_id, table_name, skip, top, count, wkt, filter, expand)
161 raise err
162 else:
--> 163 response = self.session.get_200_or_error(
164 url=self.urls.get_table.format(
165 project_id=pid, form_id=fid, table_name=table
166 ),
167 logger=log,
168 params=params,
169 )
170 return response.json()
File ~/jupyter/jupyter/lib/python3.8/site-packages/pyodk/session.py:75, in Session.get_200_or_error(self, url, logger, *args, **kwargs)
73 err = PyODKError(msg, response)
74 logger.error(err, exc_info=True)
---> 75 raise err
PyODKError: ('The request to projects/5/forms/Sicen_2022.svc/Submissions failed. Status: 400, content: b\'{"message":"The OData filter expression you provided could not be parsed: Fail at 0","code":400.18,"details":{"reason":"Fail at 0"}}\'', <Response [400]>)