Pyroma doesn't work on Windows 10
See original GitHub issuepyroma
fails to run and results in the following error. black
is just as an example here. pyroma
fails when run on other folders containing python
code as well.
Error information
$ pyroma.exe -d black/
------------------------------
Checking black/
Exception when running setup.
Traceback (most recent call last):
File "c:\users\sanbha\work\black\env\lib\site-packages\pyroma\projectdata.py", line 138, in run_setup
exec_(f.read(), glocals, glocals)
File "c:\users\sanbha\work\black\env\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 22: character maps to <undefined>
Traceback (most recent call last):
File "C:\Users\sanbha\AppData\Local\Programs\Python\Python36\Lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\sanbha\AppData\Local\Programs\Python\Python36\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\sanbha\work\black\env\Scripts\pyroma.exe\__main__.py", line 9, in <module>
File "c:\users\sanbha\work\black\env\lib\site-packages\pyroma\__init__.py", line 63, in main
rating = run(mode, argument)
File "c:\users\sanbha\work\black\env\lib\site-packages\pyroma\__init__.py", line 75, in run
data = projectdata.get_data(os.path.abspath(argument))
File "c:\users\sanbha\work\black\env\lib\site-packages\pyroma\projectdata.py", line 167, in get_data
distro = run_setup('setup.py', stop_after='config')
File "c:\users\sanbha\work\black\env\lib\site-packages\pyroma\projectdata.py", line 151, in run_setup
script_name)
RuntimeError: 'distutils.core.setup()' was never called -- perhaps 'setup.py' is not a Distutils setup script?
Steps to reproduce
- Clone
black
repository →git clone git@github.com:ambv/black.git
- Create
virtualenv
→virtualenv black/
- Activate
virtualenv
→$ . env/Scripts/activate
- Install
pyroma
usingpip
→pip install pyroma
- Run
pyroma
→pyroma -d black/
Environment
Operating system: Windows 10 Enterprise
Python version: 3.6.6, PE32+ executable (console) x86-64, for MS Windows
pyroma
version: 2.3.1
Bash version: GNU bash, version 4.4.19(2)-release (x86_64-pc-msys)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Developers - Pyroma doesn't work on Windows 10 - - Bountysource
pyroma fails to run and results in the following error. black is just as an example here. pyroma fails when run on other...
Read more >Fix Bluetooth problems in Windows - Microsoft Support
Bluetooth doesn't work after you upgrade to Windows 11 from Windows 10. Bluetooth doesn't appear in Device Manager, and there are no unknown...
Read more >Troubleshoot external monitor connections in Windows 10
Select Start > Settings > Update & Security > Windows Update , then select Check for updates.
Read more >Camera doesn't work in Windows - Microsoft Support
Learn how to troubleshoot when the camera is not working in Windows or you see ... When your camera isn't working in Windows...
Read more >Fix problems with apps from Microsoft Store
Select Start > Settings > Windows Update > Check for updates. If there is an available update, select Install now. Make sure that...
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
@regebro Seems this can be unpinned? Maybe pin the PyPI issue instead?
Indeed, adding
encoding="UTF-8"
to the offending line 122 of projectdata.py fixes this. I’ll submit a PR shortly.