On Wed, Aug 21, 2013 at 7:55 AM, Florian Apolloner <f.apollo...@gmail.com>wrote:
> > > On Wednesday, August 21, 2013 12:18:24 PM UTC+2, Anssi Kääriäinen wrote: >> >> Improvements to error messages are usually accepted. This idea, too, if >> there is a way to actually do it without ugly hacks. >> > > I doubt there is a way to get that from the error message itself and I'll > strongly object to adding logic like parsing the error message to figure > that stuff out. Especially since the traceback is pretty clear and it's not > as if one were searching through 5000 fields in a model… Also, this error > is the result of putting data into the database without prior validation > which is a bad idea anyways… > Annoyingly it is possible to get this error after passing validation. You can combine Postgres misconfigured not to be UTF-8 with UTF-8 strings with multibyte characters where the validation passes because the string 100 letters or less but the database won't be able to fit the 101 bytes into the column. It is easy to say don't misconfigure Postgres, but it can happen even when you validate correctly. The message is rather vague and could be more helpful, but not if it requires hacks. You can look into the values of variables in the rather long stacktrace to figure out what is happening. Albert > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at http://groups.google.com/group/django-developers. > For more options, visit https://groups.google.com/groups/opt_out. > -- ><><><>< Albert O'Connor - amjoc...@gmail.com albertoconnor.ca | watpy.ca | go-opendata.ca -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.