0

I'm using Smart Select to join two models using a another one. But when smart_select builds the filter, I get an error 500. When put the server in Debug mode I can see the Exception Type

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "/opt/cmi/cmi/smart_selects/views.py" in filterchain
  21.     results.sort(cmp=locale.strcoll, key=lambda x: unicode_sorter(unicode(x)))
File "/opt/cmi/cmi/smart_selects/views.py" in <lambda>
  21.     results.sort(cmp=locale.strcoll, key=lambda x: unicode_sorter(unicode(x)))

Exception Type: UnicodeDecodeError at /chaining/filter/rechazos/Causa/conjunto/1/
Exception Value: 'ascii' codec can't decode byte 0xc3 in position 29: ordinal not in range(128)

The desired output is like this:

[{"display": "A - DOC sin huella(s) en el \u00e1rea de solicitud", "value": 1}, {"display": "B1 - DOC sin firma en el \u00e1rea de solicitud", "value": 2}, {"display": "M1 - Documento roto y/o manchado", "value": 7}, {"display": "O - Faltante f\u00edsico detectado en el paquete DOC", "value": 8}, {"display": "O2 - Faltante f\u00edsico detectado en el paquete DOC", "value": 5}

I my windows 8, with the same code and same data, I'm unable to reproduce this error.

Relevants parts of the app can be viewed here: https://gist.github.com/jstoledano/6083353

  • OS: Ubuntu 12.04
  • Python: 2.7.3
  • MySQL: Ver 14.14 Distrib 5.5.31
    • Character Set: UTF-8
    • Collation: utf8_bin
toledano
  • 289
  • 11
  • 20
  • So where the error is appearing? And it'll be good to see some actual code. – Paulo Bu Jul 25 '13 at 19:48
  • Using smart_select I'm pretend to prefill a select control with a filtered QuerySet, but the control is empty. Looking in the Google Chrome's Console I can see the error 500. – toledano Jul 25 '13 at 20:03
  • Can you show us the problematic code as well as the operating system and python version that are giving you trouble? – Paulo Bu Jul 25 '13 at 20:05

0 Answers0