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 8004561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:57:18+00:00 2026-06-04T16:57:18+00:00

I tried now many things and I googled for hours but I couldn’t solve

  • 0

I tried now many things and I googled for hours but I couldn’t solve my problem.

Config File:

[/] 
tools.staticdir.root = "/Users/phil/Dropbox/Projects/AppName" 

[/main.css] 
tools.staticfile.on = True 
tools.staticfile.filename = "/Users/phil/Dropbox/Projects/AppName/css/main.css" 

[/images] 
tools.staticdir.on = True 
tools.staticdir.dir = "images" 

CherryPy Code:

import cherrypy, os
class AppName(object):
def index(self):
    return "<img src='images/logo.jpeg'>"
index.exposed = True

cherrypy.config.update('/Users/phil/Dropbox/Projects/AppName/conf/AppName.config')
cherrypy.quickstart(AppName())

My problem is that it doesn’t work, I tried everything with combining paths and so on but the image and the css won’t load when I do sth like return ‘”

Here is the error I get when loading my Application:

127.0.0.1 - - [24/May/2012:22:28:47] "GET /images/logo.jpeg HTTP/1.1" 404 1268 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5"
  • 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-04T16:57:20+00:00Added an answer on June 4, 2026 at 4:57 pm

    Not sure what the Problem was, but this works:

    [/]
    tools.staticdir.root = "/Users/phil/Dropbox/Projects/AppName"
    
    [/images]
    tools.staticdir.on = True
    tools.staticdir.dir = "images"
    

    Start App with:

    cherrypy.quickstart(AppName(), '/', 'AppName.config')
    

    CherryPy Code:

    def index(self):
        return "<img src='/images/logo.jpeg'>"
    index.exposed = True
    

    I think the / before the images is also important. Thanks to all

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having this problem for a while now. I tried so many things that
I tried a lot of things, first in the css now with jquery but
I've tried many things, but cannot fix this dot fading in with odd edges.
Here is very tricky situation i have tried many things but cant figure it
Ive tried searching for hours now and cannot find out why my code (aka,
I have tried to download images to a directory but now I want to
I'm very new to using Git, so many things escape me. Yesterday I tried
I have tried many things, such as the 2 references: http://developer.android.com/training/basics/fragments/communicating.html & http://developer.android.com/guide/components/fragments.html#CommunicatingWithActivity along
Ok, I give up. I've tried many things to create a simple login form.
I tried endlessly now you resolve this utter frustrating situation I have been having.

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.