RafayGhafoor / Subscene-Subtitle-Grabber

SubGrab is a utility that allows you to automate subtitles downloading for your media files.
112 stars 24 forks source link

Cant run subgrab #4

Closed seed1234 closed 6 years ago

seed1234 commented 6 years ago

root@sonarr:~ # subgrab Traceback (most recent call last): File "/usr/local/bin/subgrab", line 11, in load_entry_point('subgrab==0.16', 'console_scripts', 'subgrab')() File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 563, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2651, in load_entry_point return ep.load() File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2305, in load return self.resolve() File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2311, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/usr/local/lib/python2.7/site-packages/subgrab-0.16-py2.7.egg/subgrab/main.py", line 1, in from .SubGrab import main File "/usr/local/lib/python2.7/site-packages/subgrab-0.16-py2.7.egg/subgrab/SubGrab.py", line 14, in os.mkdir(log_directory) OSError: [Errno 2] No such file or directory: '/root/.local/share/Subgrab'

RafayGhafoor commented 6 years ago

@seed1234, Subgrab uses version 3 of python.

karan221 commented 3 years ago

I am getting similar error in python3 on windows `

C:\Users\Karan>subgrab -m "Gravity" Traceback (most recent call last): File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn conn.connect() File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\connection.py", line 411, in connect self.sock = ssl_wrapsocket( File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\util\ssl.py", line 428, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\util\ssl.py", line 472, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "c:\users\karan\appdata\local\programs\python\python39\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "c:\users\karan\appdata\local\programs\python\python39\lib\ssl.py", line 1040, in _create self.do_handshake() File "c:\users\karan\appdata\local\programs\python\python39\lib\ssl.py", line 1309, 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:\users\karan\appdata\local\programs\python\python39\lib\site-packages\requests\adapters.py", line 439, in send resp = conn.urlopen( File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen retries = retries.increment( File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\util\retry.py", line 531, in increment raise six.reraise(type(error), error, _stacktrace) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\packages\six.py", line 734, in reraise raise value.with_traceback(tb) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn conn.connect() File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\connection.py", line 411, in connect self.sock = ssl_wrapsocket( File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\util\ssl.py", line 428, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\urllib3\util\ssl.py", line 472, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "c:\users\karan\appdata\local\programs\python\python39\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "c:\users\karan\appdata\local\programs\python\python39\lib\ssl.py", line 1040, in _create self.do_handshake() File "c:\users\karan\appdata\local\programs\python\python39\lib\ssl.py", line 1309, 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:\users\karan\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\karan\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\Karan\AppData\Local\Programs\Python\Python39\Scripts\subgrab.exe__main__.py", line 7, in File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\subgrab\cli.py", line 120, in main sub_link = subscene.sel_title(name=args.media_name.replace(" ", ".")) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\subgrab\providers\subscene.py", line 153, in sel_title soup = scrape_page(url=SUB_QUERY, parameter=name) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\subgrab\providers\subscene.py", line 38, in scrape_page req = requests.get(url, params={"query": parameter}, headers=HEADERS) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\requests\api.py", line 76, in get return request('get', url, params=params, kwargs) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\requests\sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\requests\sessions.py", line 655, in send r = adapter.send(request, kwargs) File "c:\users\karan\appdata\local\programs\python\python39\lib\site-packages\requests\adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

`

RafayGhafoor commented 3 years ago

@karan221, This is not a similar error and I am not facing any issue with the request.

image

It may be because you sent too many requests to subscene.