Reputation: 383
Does anyone know why I keep getting this error:
JSONResponseError: 400 Bad Request
{u'Message': u'Start of list found where not expected'}
It was working fine when I used the output dictionary specified in the api, but when I since I switched to the outputs list of dicts, I've been getting the aforementioned error.
Here's the code I wrote:
transInput = {
'Key': path,
'FrameRate': 'auto',
'Resolution': 'auto',
'AspectRatio': 'auto',
'Interlaced': 'auto',
'Container': 'auto'
}
pprint (transInput)
#Create a job for each desired preset
for pId, descrip in presets.iteritems():
transOutput = {
'PresetId': pId,
'Rotate': 0,
'ThumbnailPattern': 00001,
'Key': path +"-" + descrip
}
outputs.append(transOutput)
try:
transcode.create_job(pipelineId, transInput, outputs)
except Exception, e:
print e
Upvotes: 0
Views: 518
Reputation: 5608
If you want to use a list of outputs you have to specify that as the outputs
argument:
transcode.create_job(pipelineId, transInput, outputs=output)
Upvotes: 2