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

Add tips for Supervisor user #2215

Merged
merged 3 commits into from
May 20, 2018
Merged

Add tips for Supervisor user #2215

merged 3 commits into from
May 20, 2018

Conversation

greyli
Copy link
Contributor

@greyli greyli commented May 18, 2018

When configuring Supervisor program to run with Pipenv, for example:

[program:bluelog]
command=pipenv run gunicorn -w 4 wsgi:app
directory=/home/greyli/bluelog
user=greyli

You will get Click's RuntimeError due to the locale issue:

supervisor> tail bluelog stderr
n(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py", line 676, in main
    _verify_python3_env()
  File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/_unicodefun.py", line 118, in _verify_python3_env
    'for mitigation steps.' + extra)
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.  Consult http://click.pocoo.org/python3/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

It can be fixed by adding enviroment setting in Supervisor's config file:

[supervisord]
environment=LC_ALL='en_US.UTF-8',LANG='en_US.UTF-8'

@kennethreitz
Copy link
Contributor

✨🍰✨

@kennethreitz kennethreitz merged commit 9d45786 into pypa:master May 20, 2018
@greyli greyli deleted the patch-2 branch May 20, 2018 23:54
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.

2 participants