ValueError: No JSON object could be decoded

32 views
Skip to first unread message

shik...@gmail.com

unread,
Jun 15, 2022, 4:56:50 AM6/15/22
to Bots Open Source EDI Translator
Hello, 

ich set up a route, that it gets the response data from http and translate them into db.
in the communicationIn script i used the requests to send the url and want to transform the response to json. 
it looks like this: 
r = requests.get(url=request_url, auth=(request_user, request_password), verify=False)
content = r.json()
However, a processing error 'ValueError: No JSON object could be decoded' was caused in the line r.json().
i tried to run the code in the pure python env and it works. 
But with bots it shows the error. 

Do you have an idea how to fix this? 

regards,
Ke

shik...@gmail.com

unread,
Jun 15, 2022, 5:18:45 AM6/15/22
to Bots Open Source EDI Translator
oh.. that's my fault. the url link that i send was another one. I add the format json and it works....
Reply all
Reply to author
Forward
0 new messages