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

Python3 module should convert env vars #1897

Closed
jpic opened this issue Oct 17, 2018 · 1 comment
Closed

Python3 module should convert env vars #1897

jpic opened this issue Oct 17, 2018 · 1 comment

Comments

@jpic
Copy link

jpic commented Oct 17, 2018

Is there any way to make uwsgi not to printout a traceback for every single env var on python 3 ? example :

    *** Operational MODE: preforking ***
    b'DB_ENGINE' b'django.db.backends.postgresql'
    Traceback (most recent call last):
      File "/usr/lib/python3.6/os.py", line 674, in __setitem__
        key = self.encodekey(key)
      File "/usr/lib/python3.6/os.py", line 745, in encode
        raise TypeError("str expected, not %s" % type(value).__name__)
    TypeError: str expected, not bytes
    b'PYTHONIOENCODING' b'UTF-8'
    Traceback (most recent call last):
      File "/usr/lib/python3.6/os.py", line 674, in __setitem__
        key = self.encodekey(key)
      File "/usr/lib/python3.6/os.py", line 745, in encode
        raise TypeError("str expected, not %s" % type(value).__name__)
    TypeError: str expected, not bytes
    ...

Note that you see my print statement of key and value before each traceback, that was inserted above key = self.encodekey(key).

This happens for each --env argument when the python3 module is used.

@jpic
Copy link
Author

jpic commented Aug 23, 2019

Dupe of #1143

@jpic jpic closed this as completed Aug 23, 2019
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

1 participant