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

env options not working? #11

Open
yxmark opened this issue Apr 23, 2021 · 1 comment
Open

env options not working? #11

yxmark opened this issue Apr 23, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@yxmark
Copy link

yxmark commented Apr 23, 2021

Hi, thank you for making pyuwsgi! It is amazing and it has helped me solved a lot of issus.

It seems --env option doesn't work in pyuwsgi nor does env=MYENV=12 work in `myuwsgi.ini' ?

@yxmark
Copy link
Author

yxmark commented Apr 23, 2021

Here is a python file that prints env:

# print_env.py
import os
print 'printing my_env:', os.environ["MY_ENV"]

The results look like this when using regular uwsgi:

$ venv/bin/uwsgi --env MY_ENV=123 --py ./print_env.py
printing my_env: 123

but when using pyuwsgi it raise KeyError:

$ venv/bin/pyuwsgi --env MY_ENV=123 --py ./print_env.py
    raise KeyError(key)
KeyError: 'MY_ENV'

@ipmb ipmb added the help wanted Extra attention is needed label Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants