Several bugs with the otr-support of gajim
I've been just trying to get gajim with otr-support enabled to run. It seems to be that there are some bugs within the code of the current svn-, nightly built svn-debian package and as well with the bazzar-trunk from Kjell Braden (the developer of pyotr. The first comes with the loading of the pyotr-library, it can't import "otr" because the file does not exist. Reason for that is the building of pyotr with the command "python setup.py build". The output-file of the build is called "_otr.so". Gajim tries to load "otr.so" so you need to rename it to "import _otr" and "gajim.otr_module = _otr" within the sourcecode of gajim.py. This way you can start gajim (svn&svn-deb) and see otr enabled in the feature list. But if you doubleclick on a contact to start a conversation gajim crashes with the following message:
================
otr_wrap.c:3053 FATAL: Exception in callback "add_appdata"
================
Traceback:
Traceback (most recent call last):
File "gajim.py", line 275, in add_appdata
unicode(context.username), account)
AttributeError: 'PySwigObject' object has no attribute 'username'
================
Aborted
Fnords bazaar-release isn't still able to start. It seems that he has another bug in his code. After editing the gajim.py it stops with this error:
shnifti@Elara:~/src/gajim-bazaar$ ./launch.sh
Requires docutils 0.4 for set_classes to be available
/usr/lib/python2.5/site-packages/apt/progress.py: inconsistent use of tabs and spaces in indentation
Traceback (most recent call last):
File "gajim.py", line 3495, in \<module>
Interface()
File "gajim.py", line 3325, in __init__
gajim.otr_userstates[a] = otr.otrl_userstate_create()
NameError: global name 'otr' is not defined
May it is a problem of pyotr too I don't know why it doesn't create an "otr.so". I've searched the problem their for a while and chatted to Kjell Braden but he hasn't answered yet. I also tried to rename the library from "_otr.so" to "otr.so" and copy it to the $gajim/src folder of gajim. This way all of the three gajim-trunks are throwing the same error while importing the otr library.
shnifti@Elara:~/src/gajim-bazaar$ ./launch.sh
Requires docutils 0.4 for set_classes to be available
/usr/lib/python2.5/site-packages/apt/progress.py: inconsistent use of tabs and spaces in indentation
Traceback (most recent call last):
File "gajim.py", line 258, in \<module>
import otr
ImportError: dynamic module does not define init function (initotr)
But this error seems generally to be a normal behaviour caused by the renaming of the "_otr.so". So I think the bug comes from gajim and not from pyotr. But may I'm wrong. I hope somebody will be able to fix this troubles soon and otr ist getting useable with gajim fast. Greetings, Shnifti PS: My operation system is the new Ubuntu 8.04 Hardy Heron.