kolab command line and encoding problems

Jan Kowalsky jankow at datenkollektiv.net
Tue Mar 1 19:39:30 CET 2016


Hi all,

I got some errors while using the kolab command line.

While trying to delete one mailbox I get:

kolab dm user/kontakt at example.org
Traceback (most recent call last):
  File "/usr/sbin/kolab", line 39, in <module>
    kolab = Cli()
  File "/usr/lib/python2.7/dist-packages/pykolab/cli/__init__.py", line
69, in __init__
    commands.execute('_'.join(to_execute))
  File "/usr/lib/python2.7/dist-packages/pykolab/cli/commands.py", line
138, in execute
    commands[cmd_name]['function'](conf.cli_args, kw)
  File
"/usr/lib/python2.7/dist-packages/pykolab/cli/cmd_delete_mailbox.py",
line 69, in execute
    log.error(_("Could not delete mailbox '%s'") % (delete_folder))

root at mail:~# echo $LANG
de_DE.UTF-8

root at mail:~# export LANG=C

If I change to LANG=C the deletion it works for this mailbox.

But if I try to list mailboxes I get an error as soon as there are
Mailboxes with german umlauts in the mailbox name:

kolab lm
"some mailboxes"
Traceback (most recent call last):
  File "/usr/sbin/kolab", line 39, in <module>
    kolab = Cli()
  File "/usr/lib/python2.7/dist-packages/pykolab/cli/__init__.py", line
69, in __init__
    commands.execute('_'.join(to_execute))
  File "/usr/lib/python2.7/dist-packages/pykolab/cli/commands.py", line
138, in execute
    commands[cmd_name]['function'](conf.cli_args, kw)
  File
"/usr/lib/python2.7/dist-packages/pykolab/cli/cmd_list_mailboxes.py",
line 92, in execute
    print imap_utf7.decode(folder)
  File "/usr/lib/python2.7/codecs.py", line 351, in write
    data, consumed = self.encode(object, self.errors)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdc' in
position 25: ordinal not in range(128)

Ok. Switching to de_DE.UTF-8 back it works.

But: in both situations I can't rename any mailbox with an umlaut in it.

It's Kolab 3.4 on Debian Wheezy with
pykolab 0.7.10-0~kolab4

Any ideas?
Jan


More information about the users mailing list