question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows build fails

See original GitHub issue

Bug 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:closed
  • Created 5 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
orsiniumcommented, Aug 20, 2020

flake8-pytest-style is not in the dependency graph of WPS anymore. I think it should be closed. Objections?

1reaction
adambenalicommented, Feb 27, 2020

@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 on test_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 :

The 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 for flake-bandit as well but it was fixed at some point after you opened an issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found