You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the async file submission python code snippet, there are multiple areas where a boolean is expected in the params eg. 'detectPhrases': True,
The way the code snippet is currently written, when the params object is passed in the API request, it is still in the form of a Python dictionary object. Before sending in the request this object needs to be encoded so that the API reads the boolean values as a true boolean.
For example if params = {'detectPhrases': True} then the request:
response = requests.request("POST", url, headers=headers, data=payload, params=params) will return a status 400. The resulting params will be in the form https://api.symbl.ai/v1/process/video?detectPhrases=True
In this example the capitol 'True' will not be accepted by the API and return a status 400.
In order to make this request in python the params object needs to be encoded properly. For example params = json.dumps(params), or in the request response = requests.request("POST", url, headers=headers, data=payload, params=json.dumps(params))
The text was updated successfully, but these errors were encountered:
In the async file submission python code snippet, there are multiple areas where a boolean is expected in the params eg. 'detectPhrases': True,
The way the code snippet is currently written, when the params object is passed in the API request, it is still in the form of a Python dictionary object. Before sending in the request this object needs to be encoded so that the API reads the boolean values as a true boolean.
For example if params = {'detectPhrases': True} then the request:
response = requests.request("POST", url, headers=headers, data=payload, params=params) will return a status 400. The resulting params will be in the form https://api.symbl.ai/v1/process/video?detectPhrases=True
In this example the capitol 'True' will not be accepted by the API and return a status 400.
The correct param format needs to be in the form https://api.symbl.ai/v1/process/video?detectPhrases=true
In order to make this request in python the params object needs to be encoded properly. For example params = json.dumps(params), or in the request response = requests.request("POST", url, headers=headers, data=payload, params=json.dumps(params))
The text was updated successfully, but these errors were encountered: