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
chardet 5.0 KeyError with Python 3.10 on Windows #265
Comments
A recent dependency change caused the tests running on GitHub Actions under Python 3.10.5 on Windows to fail when starting pytest run: ... INTERNALERROR> File "<frozen importlib._bootstrap>", line 123, in acquire INTERNALERROR> KeyError: xxxx The cause seems to have been a newer version of chardet package released recently. * Fixed by pinning chardet to v4 * Also pin Windows version to 2019 to match packaging workflow See-also: https://github.com/deluge-torrent/deluge/actions/runs/2578427588 Issue: chardet/chardet#265
Well, that's a baffling one. The traceback doesn't seem to be related to chardet at all |
It is rather confounding but I have narrowed it down to this commit: 3222295 And looks to be related to importing the module rather than usage, as suspected from pytest traceback, and I'll continue to investigate when I have a spare moment Testing with 3.8 and 3.9 didn't show any issues, just 3.10 affected As an aside the KeyError is a result of the pytest faulthandler calls rather than originating error, as mentioned here with pdb: https://bugs.python.org/issue34609#msg326674 |
(:wave: I landed here as part of reading the state of any bugs related to Although I'm not 100% certain, it looks like this could be related to the issue described in python/cpython#/91351 -- the lock-acquisition methods named in the stacktrace are the same, and so is the exception class raised. |
I added Mac and Windows testing to our build matrix in #267 and I can't reproduce this issue. |
The (likely intermittent) issue that appeared here has, I think, been resolved by |
Yesterday I encountered a strange CI failure for our Windows GitHub CI workflows which had been running fine until then. The Python 3.7 job passed fine but the Python 3.10 job failed.
https://github.com/deluge-torrent/deluge/actions/workflows/ci.yml?query=branch%3Adevelop
The only difference I could find from a diff of the logs was the new chardet 5.0.0 being pulled in. So I pinned chardet to 4.0.0 and CI is passing again.
GitHub Actions Environment:
Just to note that I also tested same error occurs with windows-2019.
The traceback is rather cryptic since it comes from pytest but this is all there is from the job:
The text was updated successfully, but these errors were encountered: