#20185: TypeError: unicode argument expected, got 'str' on core management
validation (used gunicorn)
--------------------------+--------------------------------------
     Reporter:  avelino   |                    Owner:  nobody
         Type:  Bug       |                   Status:  closed
    Component:  Python 2  |                  Version:  1.5
     Severity:  Normal    |               Resolution:  invalid
     Keywords:  gunicorn  |             Triage Stage:  Unreviewed
    Has patch:  0         |      Needs documentation:  0
  Needs tests:  0         |  Patch needs improvement:  0
Easy pickings:  0         |                    UI/UX:  0
--------------------------+--------------------------------------

Comment (by hobs at totalgood.com):

 Thank you very much for pointing me to the django_wsgi line that was the
 problem.

 For me run_gunicorn (gunicorn/app/django_wsgi.py) was trying to output
 error messages for one of my installed apps using the wrong StringIO. I
 reversed the try/except order for import of StringIO (to favor python2)
 and then also fixed the model inheritance in the broken app. You can do
 either to avoid this error (don't have validation errors or use the right
 StringIO to log/output the validation errors).

 This is the sort of error message that gunicorn is using StringIO to try
 to log. I was trying to ForeignKey to the abstract model
 contrib.auth.User:

     One or more models did not validate:
     agile.organization: 'user' has an m2m relation with model User, which
 has either not been installed or is abstract.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20185#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.48f30ae9cfc7f9b2e9be21d5b1ffbca5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to