This code still work a few days ago but today I run the code it has this error
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen
chunked=chunked,
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 994, in _validate_conn
conn.connect()
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connection.py", line 360, in connect
sslcontext=context,
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\util\ssl.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 423, in wrap_socket
session=session
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 870, in _create
self.do_handshake()
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] 遠端主機已強制關閉一個現存的連線。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\util\retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\packages\six.py", line 734, in reraise
raise value.with_traceback(tb)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen
chunked=chunked,
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 994, in _validate_conn
conn.connect()
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connection.py", line 360, in connect
sslcontext=context,
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\util\ssl.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 423, in wrap_socket
session=session
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 870, in _create
self.do_handshake()
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '遠端主機已強制關閉一個現存的連線。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Albert/PycharmProjects/twitterAPI/test.py", line 1, in
from twitterscraper import query_tweets
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\twitterscraper__init__.py", line 13, in
from twitterscraper.query import query_tweets
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\twitterscraper\query.py", line 73, in
proxies = get_proxies()
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\twitterscraper\query.py", line 43, in get_proxies
response = requests.get(PROXY_URL)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, kwargs)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, kwargs)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, send_kwargs)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, kwargs)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '遠端主機已強制關閉一個現存的連線。', None, 10054, None))
This code still work a few days ago but today I run the code it has this error Traceback (most recent call last): File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen chunked=chunked, File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 994, in _validate_conn conn.connect() File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connection.py", line 360, in connect sslcontext=context, File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\util\ssl.py", line 370, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 423, in wrap_socket session=session File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 870, in _create self.do_handshake() File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 1139, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [WinError 10054] 遠端主機已強制關閉一個現存的連線。
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\adapters.py", line 449, in send timeout=timeout File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\util\retry.py", line 400, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\packages\six.py", line 734, in reraise raise value.with_traceback(tb) File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen chunked=chunked, File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connectionpool.py", line 994, in _validate_conn conn.connect() File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\connection.py", line 360, in connect sslcontext=context, File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\urllib3\util\ssl.py", line 370, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 423, in wrap_socket session=session File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 870, in _create self.do_handshake() File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\ssl.py", line 1139, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '遠端主機已強制關閉一個現存的連線。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:/Users/Albert/PycharmProjects/twitterAPI/test.py", line 1, in
from twitterscraper import query_tweets
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\twitterscraper__init__.py", line 13, in
from twitterscraper.query import query_tweets
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\twitterscraper\query.py", line 73, in
proxies = get_proxies()
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\twitterscraper\query.py", line 43, in get_proxies
response = requests.get(PROXY_URL)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, kwargs)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, kwargs)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, send_kwargs)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, kwargs)
File "C:\ProgramData\Anaconda3\envs\twitterAPI\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '遠端主機已強制關閉一個現存的連線。', None, 10054, None))
any idea for fixing this issue?