If you need that header set and you don’t want to encode the dict yourself, you can also pass it directly using the json parameter (added in version 2.4.2) and it will be encoded automatically
What did you expect?
Expected a valid response from the WPS-T server, but got a 500 error due to the duplicate encoding.
Reproducible steps
for unity_sds_client < 0.2.2
f = open('workflowDescriptor.json')
data = json.load(f)
process_service.deploy_process(data)
Checked for duplicates
Yes - I've already checked
Describe the bug
When submitting a deploy request to the WPS-T server, we are double "string-a-fying" it at https://github.com/unity-sds/unity-py/blob/main/unity_sds_client/services/process_service.py#L132. BEcause we're using the json key in the requests library, this should be passed as a dict-like object not a json string.
see https://requests.readthedocs.io/en/latest/user/quickstart/#more-complicated-post-requests
What did you expect?
Expected a valid response from the WPS-T server, but got a 500 error due to the duplicate encoding.
Reproducible steps
for unity_sds_client < 0.2.2
where workflowDescriptor is available at https://github.com/unity-sds/sbg-workflows/tree/main/preprocess