2008/2/18 troelskn <[email protected]>:
>
> I'm trying to get web.py running under mod_apache. Using the latest
> checkout, I'm getting the following dump:
>
> MOD_PYTHON ERROR
>
> ProcessId:      31866
> Interpreter:    'localhost'
>
> ServerName:     'localhost'
> DocumentRoot:   '/usr/local/www/apache22/localhost/htdocs'
>
> URI:            '/index.py'
> Location:       None
> Directory:      '/usr/local/www/apache22/localhost/htdocs/'
> Filename:       '/usr/local/www/apache22/localhost/htdocs/index.py'
> PathInfo:       None
>
> Phase:          'PythonHandler'
> Handler:        'wsgiref.modpython_gateway::handler'
>
> Traceback (most recent call last):
>
>  File "/usr/local/lib/python2.5/site-packages/mod_python/
> importer.py", line 1537, in HandlerDispatch
>    default=default_handler, arg=req, silent=hlist.silent)
>
>  File "/usr/local/lib/python2.5/site-packages/mod_python/
> importer.py", line 1229, in _process_target
>    result = _execute_target(config, req, object, arg)
>
>  File "/usr/local/lib/python2.5/site-packages/mod_python/
> importer.py", line 1128, in _execute_target
>    result = object(arg)
>
>  File "/usr/local/lib/python2.5/wsgiref/modpython_gateway.py", line
> 205, in handler
>    module = __import__(modname, globals(), locals(), [''])
>
>  File "/usr/local/www/apache22/localhost/python/codep.py", line 14,
> in <module>
>    main = web.wsgifunc(web.webpyfunc(urls))
>
> AttributeError: 'module' object has no attribute 'wsgifunc'
>
> ----------
>
> Looking through the mailinglist, it looks like the api changed, so I
> tried to edit codep.py to the following:
>
> (...)
> File "/usr/local/www/apache22/localhost/python/codep.py", line 14, in
> <module>
>    main = web.application.wsgifunc(web.webpyfunc(urls, globals()))
>
> TypeError: unbound method wsgifunc() must be called with application
> instance as first argument (got function instance instead)
>
> ----------
>
> Any ideas?

Try this:

app = web.application(urls, globals())
main = app.wsgifunc()

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to