Как поймать chunkedencodingerror
try:
main()
except requests.exceptions.ChunkedEncodingError:
#do something
Happy Hippopotamus
try:
main()
except requests.exceptions.ChunkedEncodingError:
#do something