I tried to download the tagged images using Custom Vision API and in Python. I set the limit to 256 images. However, after 60-90 images, this error would show up:
[Errno 10054] An existing connection was forcibly closed by the remote host
Can I receive further help?
This is my code. I have edited out the project id and training key as I think this is private information.
data = response.read().decode(encoding). It is the later processing that is the issue.
I did a google search regarding
[Errno 10054] An existing connection was forcibly closed by the remote host. There is a solution that add edthe proxy to urllib.request. This works most of the time. When it get [Errno 10054], the images downloaded are around 100 images, which improved compared to without proxy. I do not know why this is the case though. After adding the proxy, I get another type of error
urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond