[spambayes-bugs] [ spambayes-Bugs-981970 ] tests failing
SourceForge.net
noreply at sourceforge.net
Sun Jul 18 01:10:46 CEST 2004
Bugs item #981970, was opened at 2004-06-29 14:21
Message generated for change (Comment added) made by richiehindle
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=981970&group_id=61702
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Tony Meyer (anadelonbrin)
Summary: tests failing
Initial Comment:
Assigning to Tony for initial triage since he seems to know
the most about these apps...
There are some test scripts in spambayes/test.
I tried running them just now and got this:
* test_sb-server.py -z - when starting:
User interface url is http://localhost:8881/
Listener on port 8111 is proxying localhost:8110
error: uncaptured python exception, closing channel
<sb_server.BayesProxyListener listening :8111 at
0x11570f8>
(exceptions.TypeError:object does not support item
assignment
[/Users/skip/local/lib/python2.4/asyncore.py|read|69]
[/Users/skip/local/lib/python2.4/asyncore.py|handle_read_event|358]
[/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py|handle_accept|284]
[/Users/skip/tmp/spambayes/scripts/sb_server.py|__init__|374]
[/Users/skip/tmp/spambayes/scripts/sb_server.py|__init__|199]
[/Users/skip/tmp/spambayes/scripts/sb_server.py|__init__|145]
[/Users/skip/local/lib/python2.4/asyncore.py|create_socket|234]
[/Users/skip/local/lib/python2.4/asyncore.py|add_channel|218])
when connecting via lynx:
500 Server error
Traceback (most recent call last):
File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
li
ne 461, in found_terminator
getattr(plugin, name)(**params)
TypeError: onHome() got an unexpected keyword argument ''
* test_storage.py:
...E.
======================================================================
ERROR: testNoDBMAvailable (__main__.DBStorageTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_storage.py", line 154, in testNoDBMAvailable
open_storage(db_name, True)
File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/storage.py",
line 676, in open_storage
raise NoSuchClassifierError(db_type)
NoSuchClassifierError: True
----------------------------------------------------------------------
Ran 5 tests in 0.210s
FAILED (errors=1)
* test_smtpproxy.py:
Traceback (most recent call last):
File "test_smtpproxy.py", line 93, in ?
from sb_server import state, _recreateState
ImportError: No module named sb_server
* test_programs.py:
SpamBayes POP3 Proxy Version 1.0rc1 (May 2004)
and engine SpamBayes Engine Version 0.3 (January 2004).
Loading database... User interface url is
http://localhost:8880/
FSpamBayes POP3 Proxy Version 1.0rc1 (May 2004)
and engine SpamBayes Engine Version 0.3 (January 2004).
Loading database...
Traceback (most recent call last):
File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
961, in ?
run()
File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
955, in run
start()
File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
892, in start
main(state.servers, state.proxyPorts,
state.uiPort, state.launchUI)
File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
869, in main
httpServer = UserInterfaceServer(uiPort)
File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/UserInterface.py",
line 113, in __init__
Dibbler.HTTPServer.__init__(self, uiPort)
File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
line 304, in __init__
(self, context), context._map)
File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
line 271, in __init__
self.bind(port)
File "/Users/skip/local/lib/python2.4/asyncore.py",
line 277, in bind
return self.socket.bind(addr)
File "<string>", line 1, in bind
socket.error: (48, 'Address already in use')
FSpamBayes POP3 Proxy Version 1.0rc1 (May 2004)
and engine SpamBayes Engine Version 0.3 (January 2004).
Loading database...
Traceback (most recent call last):
File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
961, in ?
run()
File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
955, in run
start()
File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
892, in start
main(state.servers, state.proxyPorts,
state.uiPort, state.launchUI)
File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
869, in main
httpServer = UserInterfaceServer(uiPort)
File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/UserInterface.py",
line 113, in __init__
Dibbler.HTTPServer.__init__(self, uiPort)
File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
line 304, in __init__
(self, context), context._map)
File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
line 271, in __init__
self.bind(port)
File "/Users/skip/local/lib/python2.4/asyncore.py",
line 277, in bind
return self.socket.bind(addr)
File "<string>", line 1, in bind
socket.error: (48, 'Address already in use')
F
======================================================================
FAIL: test_sb_server_default (__main__.TestServer)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_programs.py", line 166, in
test_sb_server_default
self._start_spawner(s)
File "test_programs.py", line 148, in _start_spawner
spawner.start()
File "test_programs.py", line 103, in start
if self.is_running() and is_any_sb_server_running():
File "test_programs.py", line 78, in is_running
"My server stopped, but global server mutex held")
AssertionError: My server stopped, but global server
mutex held
======================================================================
FAIL: test_sb_server_restore (__main__.TestServer)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_programs.py", line 180, in
test_sb_server_restore
self._start_spawner(s)
File "test_programs.py", line 148, in _start_spawner
spawner.start()
File "test_programs.py", line 103, in start
if self.is_running() and is_any_sb_server_running():
File "test_programs.py", line 78, in is_running
"My server stopped, but global server mutex held")
AssertionError: My server stopped, but global server
mutex held
======================================================================
FAIL: test_sb_server_ui_port (__main__.TestServer)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_programs.py", line 172, in
test_sb_server_ui_port
self._start_spawner(s)
File "test_programs.py", line 148, in _start_spawner
spawner.start()
File "test_programs.py", line 103, in start
if self.is_running() and is_any_sb_server_running():
File "test_programs.py", line 78, in is_running
"My server stopped, but global server mutex held")
AssertionError: My server stopped, but global server
mutex held
----------------------------------------------------------------------
Ran 3 tests in 15.811s
FAILED (failures=3)
----------------------------------------------------------------------
>Comment By: Richie Hindle (richiehindle)
Date: 2004-07-17 23:10
Message:
Logged In: YES
user_id=85414
I've submitted patch 993062 to Python to fix what I believe is
a bug in the 2.4 cgi module. I can't get a working Python
2.4 / Spambayes environment together to check that it fixes
this specific problem, but I believe it will.
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2004-07-14 06:10
Message:
Logged In: YES
user_id=552329
The 'unexpected argument' problem is a Python 2.4 change
that breaks Dibbler.py (and so all our web interfaces).
I've split this off into:
[ 990685 ] Change in cgi.parse_qs breaks sb_server in Python 2.4
<http://sourceforge.net/tracker/index.php?func=detail&aid=990685&group_id=61702&atid=498103>
And assigned it to Richie to decide whether my proposed
patch is ok or not. Until then I expect that you'll find
that test_programs still fails for you (as would launching
sb_server and then opening the web interface).
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2004-07-09 09:20
Message:
Logged In: YES
user_id=552329
Drat. This has been a bug for a while now, I believe (I
guess not many people are using the command line to specify
a different port!).
I'll check in a fix for sb_server. The test_program tests
now pass for me (well, I haven't tried the service ones).
So reassigning to me for the remaining smtpproxy one.
----------------------------------------------------------------------
Comment By: Mark Hammond (mhammond)
Date: 2004-07-09 06:13
Message:
Logged In: YES
user_id=14198
Best I can tell, the "-u" option to sb_server is broken:
% sb_server.py -u 8899
...
User interface url is http://localhost:8880/
I believe that last line should read "8899". This is
causing our attempt to stop the server to fail (as it is
trying to connect to port 8899), and then future tests fail
as the sb_server on port 8880 is still running.
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2004-07-09 05:11
Message:
Logged In: YES
user_id=552329
test_smtpproxy doesn't look like it was ever finished, I
think. (If true, this is my fault). I'll try and find time
to finish it off over the next week.
I don't know enough about the mutex stuff to figure out
test_programs, so I'm reassigning to Mark :)
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2004-07-09 03:36
Message:
Logged In: YES
user_id=552329
Fixed test_storage.
With test_sb-server.py I get this:
"""
C:\spambayes\spambayes\test>test_sb-server.py -z
Loading database...Loading state from _pop3proxy_test.pickle
pickle
_pop3proxy_test.pickle is a new pickle
Running self-test...
User interface url is http://localhost:8881/
Listener on port 8111 is proxying localhost:8110
Self-test passed.
"""
I'm using Python 2.3 - could this be a 2.3 -> 2.4 change?
Or a platform depend problem? (me Windows, you not)
I'll look into the other two shortly.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=981970&group_id=61702
More information about the Spambayes-bugs
mailing list