{"action":"closed","issue":{"url":"https://api.github.com/repos/watson-developer-cloud/python-sdk/issues/39","repository_url":"https://api.github.com/repos/watson-developer-cloud/python-sdk","labels_url":"https://api.github.com/repos/watson-developer-cloud/python-sdk/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/watson-developer-cloud/python-sdk/issues/39/comments","events_url":"https://api.github.com/repos/watson-developer-cloud/python-sdk/issues/39/events","html_url":"https://github.com/watson-developer-cloud/python-sdk/issues/39","id":139343793,"number":39,"title":"Document conversion issues with non JSON (ANSWER UNITS) response","user":{"login":"jmrr","id":8255422,"avatar_url":"https://avatars.githubusercontent.com/u/8255422?v=3","gravatar_id":"","url":"https://api.github.com/users/jmrr","html_url":"https://github.com/jmrr","followers_url":"https://api.github.com/users/jmrr/followers","following_url":"https://api.github.com/users/jmrr/following{/other_user}","gists_url":"https://api.github.com/users/jmrr/gists{/gist_id}","starred_url":"https://api.github.com/users/jmrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmrr/subscriptions","organizations_url":"https://api.github.com/users/jmrr/orgs","repos_url":"https://api.github.com/users/jmrr/repos","events_url":"https://api.github.com/users/jmrr/events{/privacy}","received_events_url":"https://api.github.com/users/jmrr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-08T17:40:47Z","updated_at":"2016-03-09T21:58:51Z","closed_at":"2016-03-09T21:58:51Z","body":"If I try with a MWE with a conversion to `NORMALIZED_TEXT` or `NORMALIZED_HTML`, \r\n\r\n```\r\nwith open('sample.pdf', 'rb') as document:\r\n    watson_config = {'conversion_target': DocumentConversionV1.NORMALIZED_TEXT}\r\n    print(json.dumps(document_conversion.convert_document(document=document, config=watson_config)))\r\n```\r\n`watson_developer_cloud_service.py` (line 233):\r\n```\r\nresponse_json = response.json()\r\n```\r\nthrows an error` JSONDecodeError: Expecting value: line 1 column 1 (char 0)`, i.e. the response doesn't conform to JSON, as it's either text or HTML, therefore I believe it should be contemplated, as I think is the original intention of `return response` in line 243."}}