-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
environment can only contain strings #467
Comments
I got the same message exactly after upgrading celery from 3.0.24 to 3.1.8 and django-celery from 3.0.23 to 3.1.1. |
I don't see how this is related to Werkzeug. |
@untitaker As segalle said, it appears that werkzeug assumes all I would suggest that werkzeug as an inspection tool is being made a bit more lenient here, however, and unicode strings support is added. |
Werkzeug doesn't care about the type at all, subprocess however does. In fact there already is a workaround in Werkzeug that attempts to fix this problem in some cases https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/serving.py#L628 Nevertheless you shouldn't use unicode keys or values with |
Should we close this then? |
I think it's a problem that Werkzeug should work around, even if Celery is "at fault" in this case. At least until Celery fixes this. (Does anyone know if it has been reported to them?) |
The problem seems to be this line: djcelery/init.py:20 in django-celery, together with the |
I don't think Werkzeug should silently work around this bug. A loop similar to https://github.com/mitsuhiko/werkzeug/blob/663e672a854bcfb10702dc54385d432a2f32707c/werkzeug/_reloader.py#L127 can be used before launching the server if you're using such broken libraries. Also, which encoding would you use for this? |
Closing this because it really is not a bug for Werkzeug to work around at. |
when running runserver_plus i get an error message: "TypeError: environment can only contain strings" (running on windows 7 x64).
i checked the list of the os.environ items and found out that CELERY_LOADER is unicode and not string.
i fixed it by changing this line to:
os.environ.setdefault(str('CELERY_LOADER'), str('djcelery.loaders.DjangoLoader'))
The text was updated successfully, but these errors were encountered: