Problem with struct.unpack in oe_mailbox.py
I'm running spambayes (1.0.4-3) on Debian unstable with Python 2.4.4c0 and a custom compiled 2.6.17 kernel. I'm using an AMD64 chip. sb_server starts up ok and proxies pop3 and smtp connections ok. I can train from the commandline ok. The problem comes when I try to train it from the web interface (using either mbox or dbx format). It bombs with the following error:- ---------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/spambayes/Dibbler.py", line 470, in found_terminator getattr(plugin, name)(**params) File "/usr/lib/python2.4/site-packages/spambayes/UserInterface.py", line 494, in onTrain content = self._convertToMbox(content) File "/usr/lib/python2.4/site-packages/spambayes/UserInterface.py", line 536, in _convertToMbox content = oe_mailbox.convertToMbox(content) File "/usr/lib/python2.4/site-packages/spambayes/oe_mailbox.py", line 444, in convertToMbox if header.isValid() and header.isMessages(): File "/usr/lib/python2.4/site-packages/spambayes/oe_mailbox.py", line 117, in isValid return self.getEntry(0) == dbxFileHeader.MAGIC_NUMBER File "/usr/lib/python2.4/site-packages/spambayes/oe_mailbox.py", line 126, in getEntry self.dbxBuffer[dbxEntry * 4:(dbxEntry * 4) + 4])[0] error: unpack str size does not match format ---------------- I'm wondering whether this is something to do with my machine architecture and the sizes of datatypes? But I'm stabbing in the dark. I can easily disable dbx support by commenting out.. content = oe_mailbox.convertToMbox(content) .. around line 536 of UserInterface.py, and this does enable me to train on mbox format via the web interface, but I'd rather keep dbx support if possible. Any ideas? Thanks, Matt
participants (1)
-
Spandex