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

[BUG]ValueError: not enough values to unpack (expected 2, got 1) #402

Open
wwang129 opened this issue Oct 4, 2024 · 1 comment
Open
Labels
bug Something isn't working needs more info This bug report is not complete

Comments

@wwang129
Copy link

wwang129 commented Oct 4, 2024

Describe the bug
curl_cffi\requests\headers.py", line 132, in init
k, v = line.split(sep, maxsplit=1) # pyright: ignore
ValueError: not enough values to unpack (expected 2, got 1)
if isinstance(headers[0], (str, bytes)): print(headers[0]) sep = ":" if isinstance(headers[0], str) else b":" h = [] for line in headers: k, v = line.split(sep, maxsplit=1) # pyright: ignore h.append((k, v.strip()))

在访问某个网站的时候响应头是b'SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u3'不包含冒号就会报错

Versions

  • OS: win11 64
  • curl_cffi version [0.7.2]
@wwang129 wwang129 added the bug Something isn't working label Oct 4, 2024
@lexiforest
Copy link
Owner

This is a violation of the HTTP, please provide an example so we can know what was going on exactly.

@lexiforest lexiforest added the needs more info This bug report is not complete label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs more info This bug report is not complete
Projects
None yet
Development

No branches or pull requests

2 participants