-
Notifications
You must be signed in to change notification settings - Fork 80
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
httpx.ConnectError: [Errno 0] Error #27
Comments
This error could have stem from network connectivity. |
I think you should check if you're using proxy or a VPN while running this code |
Yes, but website of POE works well. I use clash for windows to connect VPN, TUN mode Opened already. |
client = PoeApi("0B0o-Lg==", proxy=True) |
Then I think you are missing client certificate. Can you try installing this package: pip install tls_client |
already satisfied |
How about the token? Did you get it from the quora.com or poe.com |
quora.com ,I registered it today. What's the relationship between them? |
Well then can you specify your python version and operating system? |
Python 3.8.5 Win10 |
first try updating httpx library and see if that works: pip install -U httpx |
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ |
I come from here ading2210/poe-api, is it killed by the POE team? |
Not actually. But the poe team made it harder to catch up with by introducing cloudflare and other methods to prevent sending automation requests to their main api. |
for now its really hard for me to understand the problem you're facing. This could be a problem with the httpx library or your computer is missing SSL certificate or something. |
maybe try to uninstall the library and install again: pip3 uninstall -y poe-api-wrapper This time try using pip install poe-api-wrapper==1.1.9 |
pip install poe-api-wrapper==1.1.9 |
After updating pip, the Error changes: |
ballyregan is a lib for auto proxy. Their python version req is 3.9+ |
done with env 3.11 |
Code:
from poe_api_wrapper import PoeApi
client = PoeApi("06oT***0o-Lg==")
Terminal:
Traceback (most recent call last):
File "C:\anaconda\lib\site-packages\httpcore_exceptions.py", line 10, in map_exceptions
yield
File "C:\anaconda\lib\site-packages\httpcore_backends\sync.py", line 62, in start_tls
raise exc
File "C:\anaconda\lib\site-packages\httpcore_backends\sync.py", line 57, in start_tls
sock = ssl_context.wrap_socket(
File "C:\anaconda\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\anaconda\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\anaconda\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\anaconda\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions
yield
File "C:\anaconda\lib\site-packages\httpx_transports\default.py", line 218, in handle_request
resp = self._pool.handle_request(req)
File "C:\anaconda\lib\site-packages\httpcore_sync\connection_pool.py", line 262, in handle_request
raise exc
File "C:\anaconda\lib\site-packages\httpcore_sync\connection_pool.py", line 245, in handle_request
response = connection.handle_request(request)
File "C:\anaconda\lib\site-packages\httpcore_sync\http_proxy.py", line 271, in handle_request
connect_response = self._connection.handle_request(
File "C:\anaconda\lib\site-packages\httpcore_sync\connection.py", line 92, in handle_request
raise exc
File "C:\anaconda\lib\site-packages\httpcore_sync\connection.py", line 69, in handle_request
stream = self._connect(request)
File "C:\anaconda\lib\site-packages\httpcore_sync\connection.py", line 149, in _connect
stream = stream.start_tls(**kwargs)
File "C:\anaconda\lib\site-packages\httpcore_backends\sync.py", line 62, in start_tls
raise exc
File "C:\anaconda\lib\contextlib.py", line 131, in exit
self.gen.throw(type, value, traceback)
File "C:\anaconda\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError: [Errno 0] Error
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\anaconda\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\anaconda\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "c:\Users\22339.vscode\extensions\ms-python.python-2023.14.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy_main.py", line 39, in
cli.main()
File "c:\Users\22339.vscode\extensions\ms-python.python-2023.14.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 430, in main
run()
File "c:\Users\22339.vscode\extensions\ms-python.python-2023.14.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 284, in run_file
runpy.run_path(target, run_name="main")
File "c:\Users\22339.vscode\extensions\ms-python.python-2023.14.0\pythonFiles\lib\python\debugpy_vendored\pydevd_pydevd_bundle\pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "c:\Users\22339.vscode\extensions\ms-python.python-2023.14.0\pythonFiles\lib\python\debugpy_vendored\pydevd_pydevd_bundle\pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "c:\Users\22339.vscode\extensions\ms-python.python-2023.14.0\pythonFiles\lib\python\debugpy_vendored\pydevd_pydevd_bundle\pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "C:\desk***\PoeAPI2.py", line 3, in
client = PoeApi("06****AB0o-Lg==")
File "C:\anaconda\lib\site-packages\poe_api_wrapper\api.py", line 53, in init
'Quora-Formkey': self.get_formkey(),
File "C:\anaconda\lib\site-packages\poe_api_wrapper\api.py", line 60, in get_formkey
response = self.client.get(self.BASE_URL, headers=self.HEADERS, follow_redirects=True)
File "C:\anaconda\lib\site-packages\httpx_client.py", line 1041, in get
return self.request(
File "C:\anaconda\lib\site-packages\httpx_client.py", line 814, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
File "C:\anaconda\lib\site-packages\httpx_client.py", line 901, in send
response = self._send_handling_auth(
File "C:\anaconda\lib\site-packages\httpx_client.py", line 929, in _send_handling_auth
response = self._send_handling_redirects(
File "C:\anaconda\lib\site-packages\httpx_client.py", line 966, in _send_handling_redirects
response = self._send_single_request(request)
File "C:\anaconda\lib\site-packages\httpx_client.py", line 1002, in _send_single_request
response = transport.handle_request(request)
File "C:\anaconda\lib\site-packages\httpx_transports\default.py", line 218, in handle_request
resp = self._pool.handle_request(req)
File "C:\anaconda\lib\contextlib.py", line 131, in exit
self.gen.throw(type, value, traceback)
File "C:\anaconda\lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: [Errno 0] Error
The text was updated successfully, but these errors were encountered: