Windows build fails
See original GitHub issueBug report
What’s wrong
I don’t have any experience with Windows. So, I will appreciate any help.
Windows tests fail: https://ci.appveyor.com/project/wemake-services/wemake-python-styleguide/build/job/185lp386ce91jtsy
c:\users\appveyor\appdata\local\pypoetry\cache\virtualenvs\wemake-python-styleguide-py3.6\lib\site-packages\flake8_pytest.py:33: in run
noqa = _get_noqa_lines(file_to_check.readlines())
c:\python36\lib\encodings\cp1252.py:23: in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
E UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5978: character maps to <undefined>
------------------------------ Captured log call ------------------------------
How is that should be
Tests should pass.
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
build error on windows #3568 - google/mediapipe - GitHub
Describe the problem: When ran the follow command on windows, errors occured! I followed the official document. Can not find any solutions.
Read more >Windows Insider build error! Can't use my pc! - Microsoft Q&A
Can't use my pc! My Laptop (windows 11) suddenly had a pop up that windows insider build ran into a problem and needs...
Read more >Windows Build Error - Swift Forums
I'm trying to use the Windows release of Swift so that I can develop and build into executables. I have followed the official...
Read more >Windows build fails - Unity Forum
Hi all I'm using Unity 2020.1.3f1 today something weird happened in my project. my visual studio 2019 enterprise edition got messed up so...
Read more >HoloLens 2 build fails if Windows sdk is installed to any drive ...
The project builds. Actual Behaviour: The following error occurs: MSB3774 Could not find SDK “WindowsMobile, Version=10.0.18362.0”. Notes:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
flake8-pytest-style
is not in the dependency graph of WPS anymore. I think it should be closed. Objections?@sobolevn here is a list of all the reasons why the build doesn’t work on Windows (the ones I fixed to get it to work for me locally):
flake8-pytest
fails ontest_unicode.py
because of encoding. I have found no issue discussing this problem in the plugin’s repo and it looks like it’s been years since it has last been active.flake8-plugin-utils
fails because of encoding. See https://github.com/afonasev/flake8-plugin-utils/issues/9.import-linter
fails because of encoding again. No issue discusses the problem in the plugin’s repo.doc8
which throws D002 and D004 warnings at every line because the default line endings in Windows are CRLF. A bad workaround would be to ignore these two warnings :doc8 -q docs --ignore D002,D004
. (see https://github.com/vscode-restructuredtext/vscode-restructuredtext/issues/84)When these problems are solved, the lint check passes and the tests start running but some of them fail for these reasons :
diff
doesn’t exist on Windows, but it’s assumed to be there here : https://github.com/wemake-services/wemake-python-styleguide/blob/a716092ebaf899fc42dfba0c8d6e10effa6d7027/tests/test_plugins.py#L71 and here https://github.com/wemake-services/wemake-python-styleguide/blob/0c165adda690f9bb9e51c259255fb71ab29a9cf8/tests/test_checker/test_noqa.py#L428The encoding problem is basically that the default encoding on Windows is not UTF-8 but CP1252 which fails to decode some characters. The encoding should either be specified when opening files or use
tokenize.open()
for example which detects file encoding. The problem used to be there forflake-bandit
as well but it was fixed at some point after you opened an issue.