Opened 17 years ago
Closed 16 years ago
#145 closed defect (fixed)
`TypeError` with non string object, `LazyProxy`
Reported by: | Shun-ichi Goto <shunichi.goto@…> | Owned by: | cmlenz |
---|---|---|---|
Priority: | major | Milestone: | 0.5.1 |
Component: | Internationalization | Version: | devel |
Keywords: | Cc: |
Description
While playing trac 0.11 i18n branch, I met following error in some situations.
TypeError: coercing to Unicode: need string or buffer, LazyProxy found
This is occured in i18n.py:192. It seems that the problem is passing LazyProxy object and function expects it is string. So I patch for workaround, but I don't know the right way.
-
i18n.py
187 187 188 188 elif search_text and kind is TEXT: 189 189 if not msgbuf: 190 text = data.strip()190 text = unicode(data).strip() 191 191 if text: 192 192 data = data.replace(text, translate(text)) 193 193 yield kind, data, pos
Change History (2)
comment:1 Changed 16 years ago by cmlenz
- Component changed from General to Internationalization
- Milestone set to 0.5.1
- Status changed from new to assigned
comment:2 Changed 16 years ago by cmlenz
- Resolution set to fixed
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.
Should be fixed in [888], fix will be in 0.5.1.