1. cherrypy
  2. CherryPy
Issue #977 resolved

CherryPy 3.2 tutorial error

Anonymous created an issue

I have recently installed CherryPy (3.2.0rc1, with Python 3.1.1 on WinXP) and am working my way through the tutorials. tut01_HelloWorld.py works fine, but tutorials 2-10 fall-over in the following code... cherrypy.tree.mount(HelloWorld()) # substitute main function here

if name == 'main': import os.path thisdir = os.path.dirname(file) cherrypy.quickstart(config=os.path.join(thisdir,'tutorial.conf'))

This produces the following error... 404 Not Found The path '/' was not found. Traceback details...

The correct syntax (well, it works for me at least) is as used in tutorial1, ie. if name == 'main': cherrypy.quickstart(HelloWorld(), config=tutconf)

Many thanks, Alan Harris-Reid

Reported by aharrisreid@googlemail.co.uk

Comments (2)

  1. Log in to comment