Closed datjandra closed 7 years ago
Hi,
Looks like the the syntax you are using is incorrect. Use the following which works:
with open(os.path.join(os.getcwd(), 'USRE046396-20170502.json')) as fileinfo:
add_doc = discovery.add_document({environment_id}, {collection_id}, file_info=fileinfo)
This was the output:
{
"status": "processing",
"document_id": "5797db29-89d9-45b9-b38b-8106f635dafd"
}
Check out the documentation here: https://www.ibm.com/watson/developercloud/discovery/api/v1/?python#add-doc
I'm closing this since it's not an bug
Attached JSON file could be added from Discovery Tooling but not from Python SDK. No error is reported from Python code below but document upload failed according to Discovery Tooling.
Occurred during: Conversions
USRE046396-20170502.json.txt