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 #406
Comments
I've tried using GHunt as a lib instead of calling from the terminal and using the following code, based on Here's the code based on
|
As a fix, I am currently bypassing the SSL verification with |
Hi, the problem is related to your environment. Maybe you have a proxy, VPN, or anything else ? |
Perhaps also on a restricted network, such as a public WiFi, job/school/university, or anything else. The error comes from SSL not being verified, so its a client side issue from what I am aware. |
I get the following error when running
ghunt gaia [TARGET GAIA ID]
from the terminal, any ideas of what the problem might be?Traceback (most recent call last):
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/trio/_ssl.py", line 468, in _retry
ret = fn(*args)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 974, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
yield
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/backends/trio.py", line 80, in start_tls
raise exc
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/backends/trio.py", line 77, in start_tls
await ssl_stream.do_handshake()
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/trio/_ssl.py", line 640, in do_handshake
await self._handshook.ensure(checkpoint=True)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/trio/_ssl.py", line 221, in ensure
await self._afn(*self._args)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/trio/_ssl.py", line 610, in _do_handshake
await self._retry(self._ssl_object.do_handshake, is_handshake=True)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/trio/_ssl.py", line 473, in _retry
raise trio.BrokenResourceError from exc
trio.BrokenResourceError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
raise exc
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request
raise exc
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request
stream = await self._connect(request)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/_async/connection.py", line 150, in _connect
stream = await stream.start_tls(**kwargs)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/backends/trio.py", line 74, in start_tls
with map_exceptions(exc_map):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc)
httpcore.ConnectError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/cboutaud/.local/bin/ghunt", line 8, in
sys.exit(main())
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/ghunt.py", line 15, in main
parse_and_run()
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/cli.py", line 31, in parse_and_run
process_args(args)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/cli.py", line 44, in process_args
trio.run(gaia.hunt, None, args.gaia_id, args.json)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/trio/_core/_run.py", line 1946, in run
raise runner.main_task_outcome.error
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/modules/gaia.py", line 28, in hunt
is_found, target = await people_pa.people(as_client, gaia_id, params_template="max_details")
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/apis/peoplepa.py", line 169, in people
await person._scrape(as_client, person_data)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/parsers/people.py", line 150, in _scrape
await person_photo._scrape(as_client, photo_data, "profile_photo")
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/parsers/people.py", line 60, in _scrape
self.isDefault, self.flathash = await is_default_profile_pic(as_client, self.url)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/helpers/utils.py", line 63, in is_default_profile_pic
flathash = await get_url_image_flathash(as_client, image_url)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/helpers/utils.py", line 52, in get_url_image_flathash
req = await as_client.get(image_url)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_client.py", line 1757, in get
return await self.request(
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
response = await self._send_handling_auth(
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/Users/cboutaud/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError
The text was updated successfully, but these errors were encountered: