Skip to content
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

Encoding Error under Windows 10 (using Git shell) #329

Open
caha42 opened this issue Mar 30, 2021 · 2 comments
Open

Encoding Error under Windows 10 (using Git shell) #329

caha42 opened this issue Mar 30, 2021 · 2 comments

Comments

@caha42
Copy link

caha42 commented Mar 30, 2021

I tried to run the check in a git shell under Win10 I get the following error:

howfairis.exe https://github.com/fdiblen/grlc
Checking compliance with fair-software.eu...
url: https://github.com/fdiblen/grlc
(1/5) repository
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 0: character maps to

If it runs unsuccessful, I do not get an error, but the output is broken:

howfairis.exe https://gitlab.com/hifis/hifis-workshops/make-your-code-ready-for-publication/astronaut-analysis.git -b check-final-results
Checking compliance with fair-software.eu...
url: https://gitlab.com/hifis/hifis-workshops/make-your-code-ready-for-publication/astronaut-analysis.git
branch: check-final-results

Did not find a README[.md|.rst] file at https://gitlab.com/hifis/hifis-workshops/-/raw/check-final-results/
Proceeding without it -- expect the compliance to suffer.

(1/5) repository
▒ has_open_repository
(2/5) license
▒ has_license
(3/5) registry
▒ has_ascl_badge
▒ has_bintray_badge
▒ has_conda_badge
▒ has_cran_badge
▒ has_crates_badge
▒ has_maven_badge
▒ has_npm_badge
▒ has_pypi_badge
▒ has_rsd_badge
▒ is_on_github_marketplace
(4/5) citation
▒ has_citation_file
▒ has_citationcff_file
▒ has_codemeta_file
▒ has_zenodo_badge
▒ has_zenodo_metadata_file
(5/5) checklist
▒ has_core_infrastructures_badge

In case you cannot see it, instead of a status symbol there is a grey checkered box.

@fdiblen
Copy link
Member

fdiblen commented Mar 30, 2021

Hi @caha42,

Thank you for reporting this.
@jspaaks and me tried it on Windows 10 with Python 3.9 (from the Microsoft Store) using Git Bash (installed Git Bash from https://gitforwindows.org).

We could reproduce your issue (see the screenshot below).
image

Solution:

export PYTHONIOENCODING=UTF-8
export PYCHARM_HOSTED="Trick colorama into displaying colored output"

After setting these environment variables, the output looks much better.
image

Let us know if that solves your issue.

@caha42
Copy link
Author

caha42 commented Mar 31, 2021

Yes, that fixed it. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants