I noticed this across a few of my apps, as of recently http requests have been causing errors that did not arise earlier.
for example:
sim_voters_url = 'https://randomuser.me/api/?results='+str(len(prize_winners))
voters = anvil.http.request(sim_voters_url, method='GET', json=True)
raises this error:
HttpErrorStatus: Invalid JSON in response
This is happening on all my apps that use anvil.http.request. Does anyone know what might be happening?
shaun
September 30, 2019, 10:45am
2
I can reproduce this: it appears to be happening in Server Modules but not client code. Moving to Bug Reports. Thanks for the report, and apologies for the inconvenience.
shaun
September 30, 2019, 1:38pm
3
Update: This bug only exists in the Basic Python 2 environment. Full Python 2 and Full Python 3 both do not have this problem.
So you can work around the problem for now by switching your apps to Full Python 2 or Full Python 3, if possible.
1 Like
My server modules actually are running full python 2 environment. Should i migrate to python3?
Eventually, perhaps, but we will continue to support Full Python 2 for the medium term (probably past the official Python 2 End of Life next year).
1 Like
bridget
October 24, 2019, 10:52am
6
This issue is now fixed in the Basic Python 2 environment.
1 Like