1

I am using Python (version 3.9) and GTTS (version 2.2.2) with the app.py file

from gtts import gTTS
tts = gTTS('hello', 'en')
tts.save('hello.mp3')

But When I run python app.py, the error happens. I got an error

 ProxyError(e, request=request)
 requests.exceptions.ProxyError: HTTPSConnectionPool(host='translate.google.com', port=443): Max 
 retries exceeded with url: /_/TranslateWebserverUi/data/batchexecute (Caused by ProxyError('Cannot 
 connect to proxy.', ConnectionResetError(10054, 'The existing connection was forcibly closed to the 
 remote host。', 
 None, 10054, None)))

I included the error pictured below.

enter image description here

Please help me fix it. Thank you so much.

dacoten
  • 115
  • 2
  • 12
  • 1
    Your proxy setup is faulty, the proxy is not working or you are having some kind of connection issues. – Klaus D. Apr 02 '21 at 08:47
  • @KlausD. I don't know why. I can access translate.google.com on my browser. But when running my code, It did not work fine. – dacoten Apr 02 '21 at 09:53

0 Answers0