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

[CI.Lint.Black] Use "en_US.UTF-8" for Red Hat 6&7 Compatibility #9537

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

Johnson9009
Copy link
Contributor

Lots of company use Red Hat Enterprise Linux servers, for RHEL 6 & 7 there isn't "C.UTF-8" locale, and from the bug tracking https://bugzilla.redhat.com/show_bug.cgi?id=1361965, it seems it's hard to fix this bug in RHEL 6 & 7 soon.

@Johnson9009
Copy link
Contributor Author

@mehrdadh @tqchen Please help to review, thanks.

@tqchen tqchen merged commit ecd8a9c into apache:main Nov 22, 2021
@grant-arm
Copy link
Contributor

@Johnson9009 @tqchen This PR appears to have broken CI

Click discovered that you exported a UTF-8 locale but the locale system could not pick up from it because it does not exist. The exported locale is 'en_US.UTF-8' but it is not supported.

Version Information: 

Read returned 0

Files: python/tvm/relay/backend/contrib/ethosu/codegen.py
Running black in checking mode
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/dist-packages/black/__main__.py", line 3, in <module>
    patched_main()
  File "/usr/local/lib/python3.6/dist-packages/black/__init__.py", line 6607, in patched_main
    main()
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1043, in main
    _verify_python_env()
  File "/usr/local/lib/python3.6/dist-packages/click/_unicodefun.py", line 100, in _verify_python_env
    raise RuntimeError("\n\n".join(extra))
RuntimeError: Click will abort further execution because Python was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/unicode-support/ for mitigation steps.

This system supports the C.UTF-8 locale which is recommended. You might be able to resolve your issue by exporting the following environment variables:

    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8

@tqchen
Copy link
Member

tqchen commented Nov 22, 2021

Good catch, this is reverted for now, let us find a better way to set it @Johnson9009 and send another pR

tqchen added a commit that referenced this pull request Nov 23, 2021
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
yangulei pushed a commit to yangulei/tvm that referenced this pull request Jan 11, 2022
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
@Johnson9009 Johnson9009 deleted the lint_black branch June 16, 2023 10:41
@Johnson9009 Johnson9009 restored the lint_black branch June 16, 2023 10:41
@Johnson9009 Johnson9009 deleted the lint_black branch June 16, 2023 10:45
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

Successfully merging this pull request may close these issues.

3 participants