-
Notifications
You must be signed in to change notification settings - Fork 762
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
[Error]stream did not contain valid UTF-8 #8009
Comments
Can you share the output of running |
Additionally, which terminal/shell are you using? I couldn't reproduce this on my windows machine (german locale, codepage 850, powershell) Note crcmod==1.7 was published in 2010 and is only tested up to Python 3.1. |
Chinese locale, codepage 936, powershell 7.4.5 |
crcmod==1.7 |
Please try install with
|
|
I think the non-UTF8 bytes come from the MSVC compiler output. It seems that the output of the compiler bypasses the |
## Summary Related issues: #8009 #7549 Although `PYTHONIOENCODING=utf-8` forces python to use UTF-8 for `stdout`/`stderr`, it can't prevent code like `sys.stdout.buffer.write()` or `subprocess.call(["cl.exe", ...])` to bypass the encoder. This PR uses lossy UTF-8 conversion to avoid decoding error. ## Alternative Using `bstr` crate might be better since it can preserve original information. Or we should follow the Windows convention, unset `PYTHONIOENCODING` and decode with system default encoding. ## Test Plan Running locally with non-ASCII character in `UV_CACHE_DIR` works fine, but I have no unit test plan. Testing locale problem is hard :(
very nice , how do you find this reason ? |
I'm going to close this since #8120 is merged. Please report if the next release still doesn't work, we'll reopen and try to find and another solution in that case. |
#7726
command: uv pip install crcmod==1.7
platform:windows
version:uv 0.4.19 (a451fb6 2024-10-07)
The text was updated successfully, but these errors were encountered: