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.

Pyroma doesn't work on Windows 10

See original GitHub issue

pyroma 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

  1. Clone black repository → git clone git@github.com:ambv/black.git
  2. Create virtualenvvirtualenv black/
  3. Activate virtualenv$ . env/Scripts/activate
  4. Install pyroma using pippip install pyroma
  5. Run pyromapyroma -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:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
CAM-Gerlachcommented, Mar 6, 2021

@regebro Seems this can be unpinned? Maybe pin the PyPI issue instead?

1reaction
CAM-Gerlachcommented, Mar 6, 2021

Indeed, adding encoding="UTF-8" to the offending line 122 of projectdata.py fixes this. I’ll submit a PR shortly.

Read more comments on GitHub >

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

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