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
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:
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments.