I just tried to run your example (haven’t worked with this code for years, so may have a different environment than you), encountered other issues related to the version of pydantic - there was a major switch between v1 and v2 since this code was written, I have a draft version where I updated the syntax to switch to the v2 and if using that my requests went through … you must’ve seen export processes started on Friday, right?
Are you still getting the same error? what happens if you use pydantic==1.7.2?
I just uploaded version 0.8 of the ssaw package with the latest pydantic and python versions (3.10-3.14) tested. You don’t need to change anything in your setup since it works now, but if decide to update, should be fine too.
Hi @zurab adding to this, I found some issue with latest pydantic, Usually with pydantic 1.7.2 I used to write like this:
job = ExportJob(questionnaire_id=“5a99cf9de0e24e4f9da98af998129868$1”, export_type=“SPSS”, interview_status=‘All’)
r = ExportApi(client).start(job, wait=True,show_progress=True)
and the export worked perfectly, but with pydantic 2.x I found the following issues so far:
in ExportJob if you dont add storage_type=None than the file will be uploaded to Onedrive as default.
additionally you have to add from_date=None, to_date=None, translation_id=None even though it shows optionalhere, else you get error
When you add wait=True it only waits for like few seconds(20 second per my counting) even though the export job isnt finished, resulting in downloading the previous generated file
I hope something can be done about this specially the wait part.
I just pushed version 0.9 out, which hopefully fixes this issue and few other related ones where optional parameters were not correctly interpreted if not specified. Should work with the latest pydantic, in case for other projects you prefer to have 2.* newer version around.