GoogleCloudPlatform/healthcare

ExportDicomData API to convert DICOMs to JPEGs fails

sanjaykhobragade opened this issue · 1 comments

AssertionError: error exporting to JPEG, code: 400, response: {
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name "output_config": Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name "output_config": Cannot find field."
}
]
}
]
}
}

The issue is resolved.
Instead of this:
output_config = {'output_config': {'gcs_destination': {'uri_prefix': jpeg_folder, 'mime_type': 'image/jpeg; transfer-syntax=1.2.840.10008.1.2.4.50'}}}

it needs to be as per below:
output_config = {'gcs_destination': {'uri_prefix': jpeg_folder, 'mime_type': 'image/jpeg; transfer-syntax=1.2.840.10008.1.2.4.50'}}