Leandro Lucarella, el  8 de marzo a las 17:44 me escribiste:
> 
> Hi! I have a SQLObject with a UnicodeCol(notNone=True, default=u'') field.
> In some point of my program, I do:
> 
> my_sqlobject_instance.field += _(u'some international string')
> 
> And I get this error:
> TypeError: coercing to Unicode: need string or buffer, lazystring found
> 
> Any ideas why I can't concatenate a unicode string with an
> internationalizable string? If I remove the _() call it works fine.
> Even the plain + operator fails.
> 
> Suggestions to fix it are welcome too. Google seems to know nothing about
> it ;)

Just for the records, I fixed it using this on my program:
import turbogears.i18n
__builtins__._ = turbogears.i18n.plain_gettext

(Thanks to Diez for the tips! :)

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
 .------------------------------------------------------------------------,
  \  GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05 /
   '--------------------------------------------------------------------'
- Tata Dios lo creó a usté solamente pa despertar al pueblo y fecundar
  las gayinas.
- Otro constrasentido divino... Quieren que yo salga de joda con las
  hembras y después quieren que madrugue.
        -- Inodoro Pereyra y un gallo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to