Ticket #553 (defect)
Opened 2 years ago
Last modified 2 years ago
pure WSGI apps on the tree don't really work
Status: closed (fixed)
| Reported by: | dowski | Assigned to: | rdelon |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | CherryPy code | Keywords: | |
| Cc: |
This problem is masked in the test suite by the sync_apps function in test/helper.py. It grabs WSGI callables from the tree and directly attaches them at various "SCRIPT_NAME" mount points in _cpwsgiserver, which is not a common occurrence in a standard CP app.
Running test/test_wsgiapps.py standalone (not test.py --test_wsgiapps) reveals the problem.
Traceback (most recent call last):
File "C:\Python24\lib\site-packages\cherrypy\_cprequest.py", line 181, in run
self.respond(pi)
File "C:\Python24\lib\site-packages\cherrypy\_cprequest.py", line 220, in respond
self.get_resource(path_info)
File "C:\Python24\lib\site-packages\cherrypy\_cprequest.py", line 310, in get_resource
dispatch(path)
File "C:\Python24\lib\site-packages\cherrypy\_cprequest.py", line 447, in __call__
func, vpath = self.find_handler(path_info)
File "C:\Python24\lib\site-packages\cherrypy\_cprequest.py", line 460, in find_handler
root = app.root
AttributeError: 'function' object has no attribute 'root'
_cptree.Tree.__call__ should dispatch to the individual WSGI applications in the tree, not just to the _cpwsgi._wsgi_callable, which itself tries to dispatch to CP applications.
Change History
08/21/06 03:10:43: Modified by fumanchu
- status changed from new to closed.
- resolution set to fixed.


Fixed in [1260].