Créating activity "Leçon" the ç is considered as bug non UTF8

Bug #913581 reported by Jean Migisha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool Gradebook
Fix Released
Critical
Douglas Cerna

Bug Description

Créating activity "Leçon" the letter"ç" is considered as bug non UTF8. Here is the report (Ubuntu 11.10 i386 2GB RAM Schooltool 2.0.1)

Exception

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

Trace

File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 132, in publish
  result = publication.callObject(request, obj)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 207, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 107, in mapply
  return debug_call(obj, args)
Extra information: <schooltool.skin.flourish.zcml_content.FlourishCategoryEditView_edit.html object at 0xf1d026c>
File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 113, in debug_call
  return obj(*args)
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/page.py", line 67, in __call__
  self.update()
File "/usr/lib/python2.7/dist-packages/schooltool/gradebook/browser/category.py", line 231, in update
  super(FlourishCategoryEditView, self).update()
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/form.py", line 56, in update
  super(Form, self).update()
File "/usr/lib/python2.7/dist-packages/z3c/form/form.py", line 208, in update
  super(Form, self).update()
File "/usr/lib/python2.7/dist-packages/z3c/form/form.py", line 149, in update
  self.updateWidgets()
File "/usr/lib/python2.7/dist-packages/z3c/form/form.py", line 134, in updateWidgets
  self.widgets.update()
File "/usr/lib/python2.7/dist-packages/z3c/form/field.py", line 275, in update
  widget.update()
File "/usr/lib/python2.7/dist-packages/z3c/form/browser/text.py", line 35, in update
  super(TextWidget, self).update()
File "/usr/lib/python2.7/dist-packages/z3c/form/browser/widget.py", line 70, in update
  super(HTMLFormElement, self).update()
File "/usr/lib/python2.7/dist-packages/z3c/form/widget.py", line 123, in update
  self.value = converter.toWidgetValue(value)
File "/usr/lib/python2.7/dist-packages/z3c/form/converter.py", line 43, in toWidgetValue
  return unicode(value)

Tags: ascii code utf8
Changed in schooltool:
importance: Undecided → Critical
status: New → Triaged
Revision history for this message
Jean Migisha (migisha-jean) wrote :

I'll try to explain more precisely what happen to have this bug:

- I install SchoolTool (in french) for testing on my laptop (Ubuntu 11.10 with 2GB RAM + SchoolTool 2.0.1 from Launchpad repository)
- I've made change for the administration user
- I've changed the name of the activity (Catégorie d'activités)
- I've change one of them in "Leçon" (Lesson) and I can save it.
- But now, every time i try to edit it, I have the same screen reporting this bug, and I can't change the "Leçon" in an other word.

That's it

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

Thanks Jean. it is a pretty common sort of unicode bug which we should be able to fix quickly.

Changed in schooltool:
assignee: nobody → Alan Elkner (aelkner)
milestone: none → 2.0.2
Changed in schooltool:
assignee: Alan Elkner (aelkner) → Douglas Cerna (replaceafill)
affects: schooltool → schooltool.gradebook
Changed in schooltool.gradebook:
milestone: 2.0.2 → none
milestone: none → 2.0.2
status: Triaged → Fix Committed
Revision history for this message
Douglas Cerna (replaceafill) wrote :

Jean, I just fixed this in our development branch. Since I don't know when it could be released, you could download the attachment below and copy it manually.

Instructions:

---------------------------------

1. Download the attached file to your hard drive

2. Stop the schooltool service:

$ sudo service schooltool stop

3. Copy the new file to the appropriate place:

$ sudo cp /PATH/TO/YOUR/DOWNLOADED/FILE /usr/share/pyshared/schooltool/gradebook/browser/category.py

4. Start the schooltool service:

$ sudo service schooltool start

---------------------------------

I just tested this and you can edit the category back. Good luck :)

Revision history for this message
Jean Migisha (migisha-jean) wrote :

Thank you Douglas,

I gona try your patch, and give you a return.
15 min later.
I've try it, and for me it's OK.
Good job.

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

Incidentally, this file will be overwritten the next time SchoolTool is upgraded, but the change should be in our next release, so it should just keep working.

Changed in schooltool.gradebook:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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