Server error when defining schedule (unicode)

Bug #87681 reported by João Neves
24
Affects Status Importance Assigned to Milestone
SchoolTool
Fix Released
Critical
Ignas Mikalajūnas

Bug Description

Version: SVN r6658 on an Ubuntu Edgy
Problem: after choosing the periods for a schedule, I got an internal server error.

Almost all the strings used had non-ascii chars (timetable, section, course). So I can't pinpoint which one(s) caused this.

Exception:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 24: ordinal not in range(128)

Traceback:

File "/home/joao/testes/schooltool/schooltool/Zope3/src/zope/publisher/publish.py", line 133, in publish
  result = publication.callObject(request, obj)
File "/home/joao/testes/schooltool/schooltool/Zope3/src/zope/app/publication/zopepublication.py", line 161, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/home/joao/testes/schooltool/schooltool/Zope3/src/zope/publisher/publish.py", line 108, in mapply
  return debug_call(obj, args)
Extra information: <bound method SectionTimetableSetupView.__call__ of <zope.app.publisher.browser.viewmeta.SectionTimetableSetupView object at 0xb05c852c>>
File "/home/joao/testes/schooltool/schooltool/Zope3/src/zope/publisher/publish.py", line 114, in debug_call
  return obj(*args)
File "/home/joao/testes/schooltool/schooltool/src/schooltool/timetable/browser/__init__.py", line 654, in __call__
  day.add(period_id, act)
File "/home/joao/testes/schooltool/schooltool/src/schooltool/timetable/__init__.py", line 325, in add
  zope.event.notify(event)
File "/home/joao/testes/schooltool/schooltool/Zope3/src/zope/event/__init__.py", line 23, in notify
  subscriber(event)
File "/home/joao/testes/schooltool/schooltool/Zope3/src/zope/component/event.py", line 26, in dispatch
  for ignored in zope.component.subscribers(event, None):
File "/home/joao/testes/schooltool/schooltool/Zope3/src/zope/component/_api.py", line 130, in subscribers
  return sitemanager.subscribers(objects, interface)
File "/home/joao/testes/schooltool/schooltool/Zope3/src/zope/component/registry.py", line 290, in subscribers
  return self.adapters.subscribers(objects, provided)
File "/home/joao/testes/schooltool/schooltool/Zope3/src/zope/interface/adapter.py", line 535, in subscribers
  subscription(*objects)
File "/home/joao/testes/schooltool/schooltool/src/schooltool/timetable/model.py", line 397, in addEventsToCalendar
  calendar = timetable.model.createCalendar(term, timetable)
File "/home/joao/testes/schooltool/schooltool/src/schooltool/timetable/model.py", line 154, in createCalendar
  activity=activity)
File "/home/joao/testes/schooltool/schooltool/src/schooltool/timetable/model.py", line 346, in __init__
  CalendarEvent.__init__(self, *args, **kwargs)
File "/home/joao/testes/schooltool/schooltool/src/schooltool/app/cal.py", line 60, in __init__
  self.__name__ = base64.encodestring(self.unique_id).replace('\n', '')
File "base64.py", line 315, in encodestring
  pieces.append(binascii.b2a_base64(chunk))

Tags: i18n
João Neves (jneves)
description: updated
description: updated
Revision history for this message
João Neves (jneves) wrote :

The problem still occurs when the course, timetable, term and section only have ascii characters. I'm resetting the system for more experiments.

Revision history for this message
João Neves (jneves) wrote :

OK. Resetting the system and using only ascii characters, it works fine. So it's really a problem with non-ascii characters.

Changed in schooltool:
importance: Undecided → Medium
Revision history for this message
William Grant (wgrant) wrote :

This looks substantially like #80197.

Changed in schooltool:
status: New → Confirmed
Revision history for this message
Ignas Mikalajūnas (ignas) wrote :

Any unicode character in term or ttschema title will break schooltool.

Changed in schooltool:
importance: Medium → Critical
assignee: nobody → ignas
Changed in schooltool:
status: Confirmed → Fix Committed
Changed in schooltool:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.