Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7730059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:07:41+00:00 2026-06-01T06:07:41+00:00

I am new to cherrypy and am trying to mount a simple hello world

  • 0

I am new to cherrypy and am trying to mount a simple hello world application but it keeps returning “NotFound: (404, “The path ‘/’ was not found.”)”, but I have defined it.

Here’s what I got,

In the __init__.py

import cherrypy
from HomeNetMain import HomeNetMain

cherrypy.config.update("global.cfg")
#I have tried "" for the script name parm but that doesn't work
cherrypy.tree.mount(HomeNetMain,"/","main.cfg") 
cherrypy.engine.start()
cherrypy.quickstart()

In another file I have

import cherrypy

class HomeNetMain:

    @cherrypy.expose
    def index(self):
       return "Hello World"

I have tried with both the decorator and index.exposed=True to no avail (sub question what is the preferred method for cherrypy the decorator or index.exposed)

global.cfg

[global]
server.socket_host: "127.0.0.1"
server.socket_port: 9080
log.screen: True
log.error_file: "/tmp/cherrypy.error"
log.access_file: "/tmp/cherrypy.access"

main.cfg

[/]
log.screen: True
log.error_file: "/tmp/homenet.error"
log.access_file: "/tmp/homenet.access"

I appreciate any help, thanks in advance.

edit

Here is the full stacktrace

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/CherryPy-3.2.2-py2.7.egg/cherrypy/_cprequest.py", line 656, in respond
response.body = self.handler()
File "/usr/local/lib/python2.7/dist-packages/CherryPy-3.2.2-py2.7.egg/cherrypy/lib/encoding.py", line 188, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/CherryPy-3.2.2-py2.7.egg/cherrypy/_cperror.py", line 386, in __call__
raise self
NotFound: (404, "The path '/' was not found.")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:07:42+00:00Added an answer on June 1, 2026 at 6:07 am

    Turns out I shouldn’t have been using cherrypy.quickstart() I changed the code to the following and it worked fine

    cherrypy.engine.start()
    cherrypy.engine.block()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to do a simple proof of concept on a new EC2
new to ruby, and rails... but not to the amp stack. my preferred method
new to python. This is probably simple but I haven't found an answer. rndStr
New to Scala, but experienced in C++ I'm trying to implement (possibly misguidedly) a
New to javascript, but I'm sure this is easy. Unfortunately, most of the google
New to all this so forgive my ignorance. I am trying to figure out
New to Quartz and I am curious on the drawing speeds of simple shapes,
New question, but really close to need to refresh page in jquery mobile .
I'm very new to CherryPy. I want to know which CherryPy version is installed
I am new to the python web dev world and kind of confused about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.