01-14-06 02:18 AM
Graham Dumpleton wrote:
>
> On 12/01/2006, at 11:10 AM, Jim Gallacher wrote:
>
>
>
> I get a failure on test_req_add_empty_handler_string. I don't know if
> this is because of other local hacks I have in place or not. But for it
> to pass I need the following change to the test.py:
This test was of some concern, as I thought the error log message might
be inconsistent.
> Index: test.py
> ========================================
===========================
> --- test.py (revision 368329)
> +++ test.py (working copy)
> @@ -516,8 +516,8 @@
> f = open(os.path.join(SERVER_ROOT, "logs/error_log"))
> log = f.read()
> f.close()
> - if log.find("contains no 'handler'") == -1:
> - self.fail("""Could not find "contains no 'handler'" in
> error_log""")
> + if log.find("No module named") == -1:
> + self.fail("""Could not find "No module named" in
> error_log""")
>
> def test_accesshandler_add_handler_to_empty_
hl_conf(self):
> # Note that there is no PythonHandler specified in the the
> VirtualHost
>
> The messages in the error log being:
>
> [Thu Jan 12 21:39:35 2006] [notice] mod_python: (Re)importing modu
le ''
> [Thu Jan 12 21:39:35 2006] [error] [client 127.0.0.1] PythonHa
ndler :
> Traceback (most recent call last):
> [Thu Jan 12 21:39:35 2006] [error] [client 127.0.0.1] PythonHa
ndler :
> File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
> python2.3/site-packages/mod_python/apache.py", line 284, in
> HandlerDispatch\n log=debug)
> [Thu Jan 12 21:39:35 2006] [error] [client 127.0.0.1] PythonHa
ndler :
> File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
> python2.3/site-packages/mod_python/apache.py", line 468, in
> import_module\n f, p, d = imp.find_module(parts[i], path)
> [Thu Jan 12 21:39:35 2006] [error] [client 127.0.0.1] PythonHa
ndler :
> ImportError: No module named
>
Your error message actually makes more sense, as the last line in my
error_log for this exception mentions PIL. I have *no* idea where that
comes from but was hoping that the final line would at least always
contain the string "contains no 'handler'.
Here is my error_log:
[Thu Jan 12 08:25:13 2006] [error] [client 127.0.0.1]
req_add_empty_handler_string
[Thu Jan 12 08:25:13 2006] [notice] mod_python: (Re)importing module
''
[Thu Jan 12 08:25:13 2006] [error] [client 127.0.0.1] PythonHand
ler :
Traceback (most recent call last):
[Thu Jan 12 08:25:13 2006] [error] [client 127.0.0.1] PythonHand
ler :
File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 291,
in HandlerDispatch\n arg=req, silent=hlist.silent)
[Thu Jan 12 08:25:13 2006] [error] [client 127.0.0.1] PythonHand
ler :
File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 531,
in resolve_object\n raise AttributeError, s
[Thu Jan 12 08:25:13 2006] [error] [client 127.0.0.1] PythonHand
ler :
AttributeError: module
'/usr/lib/python2.3/site-packages/PIL/__init__.pyc' contains no 'handler'
Perhaps some other people could check out trunk, run the tests and let
me know what shows up in the error_log after the
req_add_empty_hander_string line.
Thanks,
Jim
[ Post a follow-up to this message ]
|