0

我在 app.py 文件中使用 Python(3.9 版)和 GTTS(2.2.2 版)

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

但是当我运行 python app.py 时,会发生错误。我有一个错误

 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)))

我包括了下图所示的错误。

在此处输入图像描述

请帮我修复它。太感谢了。

4

0 回答 0