Skip to content
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

not working correctly #9

Open
muzammilshafique opened this issue Sep 7, 2023 · 3 comments
Open

not working correctly #9

muzammilshafique opened this issue Sep 7, 2023 · 3 comments

Comments

@muzammilshafique
Copy link

can you make it in single package or upload on aur so i can use it without any issue ;-;

@Montvydas
Copy link
Owner

Can you please expand on what exactly is not working?

@mikelin499
Copy link

Hello,

it looks like i have internet connection issue. Could you please take a look at the error code? I use vpn in my country. it is good with deepl api, but won't work with your code. thanks a looooot.

Traceback (most recent call last):
File "C:\Users\49901\anaconda3\envs\whisper\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\49901\anaconda3\envs\whisper\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\49901\anaconda3\envs\whisper\Scripts\translatesubs.exe_main
.py", line 7, in
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\translatesubs\main.py", line 93, in main
original, translated = translate(language_manager, separators_to_try(args.separator),
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\translatesubs\main.py", line 155, in translate
original, translated = language_manager.translate_text(pronounce_origin=pronounce_origin,
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\translatesubs\managers\language_manager.py", line 48, in translate_text
for trans in translated:
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\translatesubs\translators\googletrans.py", line 47, in translate
google_translated = GoogleTrans._do_translate(text, to_lang)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\translatesubs\translators\googletrans.py", line 85, in _do_translate
return translator.translate(text, dest=to_lang)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\googletrans\client.py", line 205, in translate
translated = self.translate(item, dest=dest, src=src, **kwargs)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\googletrans\client.py", line 210, in translate
data, response = self._translate(text, dest, src, kwargs)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\googletrans\client.py", line 108, in _translate
r = self.client.get(url, params=params)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpx_client.py", line 755, in get
return self.request(
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpx_client.py", line 600, in request
return self.send(
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpx_client.py", line 620, in send
response = self.send_handling_redirects(
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpx_client.py", line 647, in send_handling_redirects
response = self.send_handling_auth(
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpx_client.py", line 684, in send_handling_auth
response = self.send_single_request(request, timeout)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpx_client.py", line 714, in send_single_request
) = transport.request(
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpcore_sync\http_proxy.py", line 110, in request
return self._tunnel_request(
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpcore_sync\http_proxy.py", line 214, in _tunnel_request
proxy_connection.start_tls(url[1], timeout)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpcore_sync\connection.py", line 126, in start_tls
self.connection.start_tls(hostname, timeout)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpcore_sync\http11.py", line 71, in start_tls
self.socket = self.socket.start_tls(hostname, self.ssl_context, timeout)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpcore_backends\sync.py", line 49, in start_tls
wrapped = ssl_context.wrap_socket(
File "C:\Users\49901\anaconda3\envs\whisper\lib\contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "C:\Users\49901\anaconda3\envs\whisper\lib\site-packages\httpcore_exceptions.py", line 12, in map_exceptions
raise to_exc(exc) from None
httpcore._exceptions.ConnectTimeout: _ssl.c:1112: The handshake operation timed out

@muzammilshafique
Copy link
Author

Can you please expand on what exactly is not working?

Traceback (most recent call last):
File "/usr/bin/translatesubs", line 33, in
sys.exit(load_entry_point('translatesubs==0.2.4', 'console_scripts', 'translatesubs')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/translatesubs", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/init.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/lib/python3.11/site-packages/translatesubs-0.2.4-py3.11.egg/translatesubs/main.py", line 3, in
File "/usr/lib/python3.11/site-packages/translatesubs-0.2.4-py3.11.egg/translatesubs/managers/language_manager.py", line 8, in
File "/usr/lib/python3.11/site-packages/translatesubs-0.2.4-py3.11.egg/translatesubs/utils/constants.py", line 1, in
File "/usr/lib/python3.11/site-packages/translatesubs-0.2.4-py3.11.egg/translatesubs/translators/googletrans.py", line 1, in
File "/home/muzammil/.local/lib/python3.11/site-packages/googletrans/init.py", line 6, in
from googletrans.client import Translator
File "/home/muzammil/.local/lib/python3.11/site-packages/googletrans/client.py", line 12, in
import httpcore
File "/home/muzammil/.local/lib/python3.11/site-packages/httpcore/init.py", line 1, in
from ._api import request, stream
File "/home/muzammil/.local/lib/python3.11/site-packages/httpcore/_api.py", line 5, in
from ._sync.connection_pool import ConnectionPool
File "/home/muzammil/.local/lib/python3.11/site-packages/httpcore/_sync/init.py", line 1, in
from .connection import HTTPConnection
File "/home/muzammil/.local/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 14, in
from .http11 import HTTP11Connection
File "/home/muzammil/.local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 49, in
class HTTP11Connection(ConnectionInterface):
File "/home/muzammil/.local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 161, in HTTP11Connection
self, event: h11.Event, timeout: Optional[float] = None
^^^^^^^^^
AttributeError: module 'h11' has no attribute 'Event'. Did you mean: '_events'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants