Schooltool crashes if ldap user has non-ascii characters in their names

Bug #1277518 reported by Samuli Valavuo on 2014-02-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool LDAP
Gediminas Paulauskas

Bug Description

I'm trying to implement SchoolTool with zentyal for my kids school.
This is testing environment at the moment because I can't show school staff the demo.

Problem is that teachers have scandic letters in their names (not the user id).

File "/usr/lib/python2.7/dist-packages/zope/publisher/", line 129, in publish
  obj = request.traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/", line 540, in traverse
  ob = super(BrowserRequest, self).traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/", line 457, in traverse
  ob = super(HTTPRequest, self).traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/", line 249, in traverse
  publication.callTraversalHooks(self, obj)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/", line 137, in callTraversalHooks
  self._maybePlacefullyAuthenticate(request, ob)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/", line 124, in _maybePlacefullyAuthenticate
  principal = auth.authenticate(request)
File "/usr/lib/python2.7/dist-packages/schooltool/app/", line 220, in authenticate
  return self.authPlugin.authenticate(request)
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/", line 304, in authenticate
  principal = self.getPrincipal('sb.person.' + session['username'])
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/", line 370, in getPrincipal
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/", line 476, in update
  super(LDAPPerson, self).update()
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/", line 462, in update
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/", line 639, in update
  super(PersonLDAPInetOrgPersonPart, self).update()
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/", line 600, in update
  super(PersonLDAPOrganizationalPersonPart, self).update()
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/", line 574, in update
  'first_name': self.oneline(,
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/", line 569, in oneline
  return t and (u' '.join(t)).strip() or u''

Name in zentyal ldap is "Nina Mäkelä"

I can change that name to Makela, but then every other aplication shows that too.

- Samuli

Changed in schooltool:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Gediminas Paulauskas (menesis)
affects: schooltool → schooltool.ldap
Changed in schooltool.ldap:
assignee: Gediminas Paulauskas (menesis) → nobody
assignee: nobody → Gediminas Paulauskas (menesis)
milestone: none → 1.0.2
Gediminas Paulauskas (menesis) wrote :

I have made a 1.0.2 release with a fix for this.

Do you have the SchoolTool PPA enabled and what Ubuntu version are you running?

Changed in schooltool.ldap:
status: Fix Committed → Fix Released
Samuli Valavuo (svalavuo) wrote :


Just installed trunk PPA today.
I use 12.04 LTS

Samuli Valavuo (svalavuo) wrote :

Just ran apt-get upgrade, but 1.0.2 wasn't there

Gediminas Paulauskas (menesis) wrote :

The package is still waiting for build, will be there in an hour or so.

But trunk PPA? It is an untested snapshot of development code, that may break any day without warning. You should reinstall from the dev PPA before you enter too much data.

It is not possible to downgrade from 2.7.0dev to 2.6.x, but you can export an XLS file (School export), delete ContactRelationships sheet (incompatible format at the moment), and import into a 2.6 instance.

Samuli Valavuo (svalavuo) wrote :

I can purge my current installation. There's no content yet.
My system is 64-bit if it has any meaning.

Samuli Valavuo (svalavuo) wrote :

Thank You!
Now my setup works.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers