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

UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long) #3

Open
spirillen opened this issue Sep 6, 2022 · 0 comments

Comments

@spirillen
Copy link

spirillen commented Sep 6, 2022

Hey @funilrys got this error in a PyFunceble job

File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/PyFunceble/query/http_status_code.py", line 337, in get_status_code
    req = PyFunceble.factory.Requester.get(
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/PyFunceble/query/requests/requester.py", line 213, in wrapper
    req = getattr(self.session, verb.lower())(*args, **kwargs)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/requests/sessions.py", line 723, in send
    history = [resp for resp in gen]
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/requests/sessions.py", line 723, in <listcomp>
    history = [resp for resp in gen]
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/requests/sessions.py", line 266, in resolve_redirects
    resp = self.send(
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/PyFunceble/query/requests/adapter/http.py", line 129, in send
    response = super().send(request, **kwargs)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/urllib3/contrib/socks.py", line 96, in _new_conn
    conn = socks.create_connection(
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/socks.py", line 199, in create_connection
    sock.connect((remote_host, remote_port))
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/socks.py", line 47, in wrapper
    return function(*args, **kwargs)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/socks.py", line 809, in connect
    negotiate(self, dest_addr, dest_port)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/socks.py", line 443, in _negotiate_SOCKS5
    self.proxy_peername, self.proxy_sockname = self._SOCKS5_request(
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/socks.py", line 520, in _SOCKS5_request
    resolved = self._write_SOCKS5_address(dst, writer)
  File "$HOME/Downloads/git_projects/clefspeare13/pornhosts/miniconda/envs/pyfunceble/lib/python3.10/site-packages/socks.py", line 569, in _write_SOCKS5_address
    host_bytes = host.encode("idna")
`UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)`

But as I remember it as the idna module comes from here, I posted the error log here

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

1 participant