Mabzak-Knight / NyanTranslate

Simple Manga Translator Supporting 23 Languages
http://nyantl.ddns.net/
MIT License
9 stars 2 forks source link

Cannot run app.py #2

Closed YomostXme closed 8 months ago

YomostXme commented 8 months ago

I got this error when running app.py

Traceback (most recent call last): File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 1053, in _validate_conn conn.connect() File "C:\Python311\Lib\site-packages\urllib3\connection.py", line 419, in connect self.sock = ssl_wrapsocket( ^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\util\ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\util\ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\ssl.py", line 517, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\ssl.py", line 1108, in _create self.do_handshake() File "C:\Python311\Lib\ssl.py", line 1379, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Python311\Lib\site-packages\requests\adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\util\retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\packages\six.py", line 769, in reraise raise value.with_traceback(tb) File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 1053, in _validate_conn conn.connect() File "C:\Python311\Lib\site-packages\urllib3\connection.py", line 419, in connect self.sock = ssl_wrapsocket( ^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\util\ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\util\ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\ssl.py", line 517, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\ssl.py", line 1108, in _create self.do_handshake() File "C:\Python311\Lib\ssl.py", line 1379, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Python311\Lib\site-packages\huggingface_hub\file_download.py", line 1238, in hf_hub_download metadata = get_hf_file_metadata( ^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(args, kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\huggingface_hub\file_download.py", line 1631, in get_hf_file_metadata r = _request_wrapper( ^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\huggingface_hub\file_download.py", line 385, in _request_wrapper response = _request_wrapper( ^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\huggingface_hub\file_download.py", line 408, in _request_wrapper response = get_session().request(method=method, url=url, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\huggingface_hub\utils_http.py", line 67, in send return super().send(request, args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\requests\adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)), '(Request ID: 26c659a5-331f-40b0-bfa8-b33531766004)')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Python311\Lib\site-packages\transformers\utils\hub.py", line 385, in cached_file resolved_file = hf_hub_download( ^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\huggingface_hub\file_download.py", line 1371, in hf_hub_download raise LocalEntryNotFoundError( huggingface_hub.utils._errors.LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "E:\Program\NyanTranslate\app.py", line 3, in from penerjemah import save_and_translate,plance_text File "E:\Program\NyanTranslate\penerjemah.py", line 12, in mocr = MangaOcr() ^^^^^^^^^^ File "E:\Program\NyanTranslate\ocr\ocr.py", line 15, in init self.feature_extractor = AutoFeatureExtractor.from_pretrained(pretrained_model_name_or_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\transformers\models\auto\feature_extraction_auto.py", line 343, in from_pretrained configdict, = FeatureExtractionMixin.get_feature_extractor_dict(pretrained_model_name_or_path, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\transformers\feature_extraction_utils.py", line 498, in get_feature_extractor_dict resolved_feature_extractor_file = cached_file( ^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\transformers\utils\hub.py", line 425, in cached_file raise EnvironmentError( OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like kha-white/manga-ocr-base is not the path to a directory containing a file named preprocessor_config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.