[Tutor] Cherrypy and Iframes (or how to insert a file in a, page)

Alan Harris-Reid aharrisreid at googlemail.com
Sun Apr 10 01:04:15 CEST 2011


Andreas...

 >  NotFound: (404, "The path '/file.txt' was not found.")

This error message often occurs because file.txt is a static file and 
you have not told CherryPy where to look for static files.  From the 
look of the error I am guessing that file.txt is in your root directory, 
in which case you need the following in your configuration file.

[/]
tools.staticdir.root = '/path/to/root/folder'     # no trailing backslash
tools.staticdir.on = True
tools.staticdir.dir = ""                                   # necessary 
to serve static files in home folder

Hope this helps.
Alan Harris-Reid



More information about the Tutor mailing list