PDF Generation fails on week, month and year....
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SchoolTool |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When try to print a pdf of resource's calendar, fails on week, month and year, but diary runs ok.
This is the traceback:
Exception
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 20: ordinal not in range
(128)
Traceback
File "/usr/lib/
File "/usr/lib/
callObject
File "/usr/lib/
Extra information: <bound method MonthlyPDFCalen
<zope.app.
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
self._setup(text, style, bulletText, frags, cleanBlockQuote
File "/usr/lib/
style, frags, bulletTextFrags = _parser.
File "/usr/lib/
self.feed(text)
Changed in schooltool: | |
status: | In Progress → Unconfirmed |
Changed in schooltool: | |
status: | New → Confirmed |
Changed in schooltool: | |
assignee: | nobody → jfroche |
Changed in schooltool: | |
status: | Fix Committed → Fix Released |
Thank you for the bug report.
I think I know what causes it: PDFCalendarView Base.daySubtitl e returns a Unicode
object, and passes it directly to reportlab's Paragraph, which expects a UTF-8
encoded string. Boom!
Translated day names cause the bug; ASCII-only day names hide the bug -- this is
why the bug wasn't noticed during development.
See also issue 439 for more i18n bugs in pdfcal.py