Zuriar
Zuriar

Reputation: 11782

Missing tutorial.conf file on cherrypy demo

I have installed cherryPy as per instructions here:

http://docs.cherrypy.org/en/latest/install.html

When I run:

python -m cherrypy.tutorial.tut01_helloworld

I get the following error:

Traceback (most recent call last):
 File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
  "__main__", fname, loader, pkg_name)
 File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
   exec code in run_globals
 File "/usr/local/lib/python2.7/dist-packages/cherrypy/tutorial/tut01_helloworld.py",       line 34, in <module>
  cherrypy.quickstart(HelloWorld(), config=tutconf)
  File "/usr/local/lib/python2.7/dist-packages/cherrypy/__init__.py", line 169, in   quickstart
   _global_conf_alias.update(config)
   File "/usr/local/lib/python2.7/dist-packages/cherrypy/_cpconfig.py", line 158, in update
   reprconf.Config.update(self, config)
   File "/usr/local/lib/python2.7/dist-packages/cherrypy/lib/reprconf.py", line 160, in update
   config = Parser().dict_from_file(config)
   File "/usr/local/lib/python2.7/dist-packages/cherrypy/lib/reprconf.py", line 232, in dict_from_file
   self.read(file)
    File "/usr/local/lib/python2.7/dist-packages/cherrypy/lib/reprconf.py", line 202, in read
    fp = open(filename)
   IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/cherrypy/tutorial/tutorial.conf'

Is this something missing/wrong with CherryPy or is it something I should have done?

thanks

Upvotes: 4

Views: 1216

Answers (3)

Harun ERGUL
Harun ERGUL

Reputation: 5940

If you are installed python 2.7 version the you can find tutorial.conf file in this folder

C:\Python27\cherrypy\tutorial

Upvotes: 0

cbonsig
cbonsig

Reputation: 51

I had the same problem on OS X 10.10 Yosemite. I got the file from the github source and copied it into /Library/Python/2.7/site-packages/cherrypy/tutorial:

https://github.com/cherrypy/cherrypy/blob/master/cherrypy/tutorial/tutorial.conf

Upvotes: 4

Daniel
Daniel

Reputation: 86

Had the same problem. Found the missing file in here:

Python34\Lib\site-packages\PURELIB\cherrypy\tutorial

Upvotes: 7

Related Questions