Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #832 (closed defect: invalid)

Opened 13 years ago

Last modified 12 years ago

TG Welcome page hangs waiting for localhost trying to display tg_under_the_hood.png

Reported by: mark.favas@… Owned by: anonymous
Priority: normal Milestone:
Component: CherryPy Version: 0.9a5
Severity: normal Keywords:


Platform: FC5, Firefox, TG 0.9a5. When starting a new project (following the tutorial), the TG Welcome page does not display the tg_under_the_hood.png image, just sits there waiting for localhost. If I replace that image with something else (with the same name), TG displays it fine. If I load the image into Firefox through the filesystem instead of through TG, the image displays fine. With 0.9a4 the Welcome page displayed fine.

Change History

comment:1 Changed 13 years ago by godoy

I can't reproduce it here. And I tested 2 quickstarted projects (no identity and SQL Object). - - "GET /static/images/tg_under_the_hood.png HTTP/1.1" 200 4010 "http://localhost:8080/" "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv: Gecko/20060425 SUSE/ Firefox/"

This is with Firefox on SuSE 10.0.

Does it happen with all your quickstarted projects?

comment:2 Changed 13 years ago by mark.favas@…

Yes, it happens with any quickstarted project (which is all I have at this stage). """ 2006-05-05 12:52:23,367 cherrypy.msg INFO HTTP: Serving HTTP on  http://localhost:8080/ 2006-05-05 12:52:53,674 dodo.controllers DEBUG Happy TurboGears Controller Responding For Duty 2006-05-05 12:52:53,674 dodo.controllers DEBUG Happy TurboGears Controller Responding For Duty - - "GET / HTTP/1.1" 200 1746 "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060419 Fedora/ Firefox/ pango-text" - - "GET /static/images/tg_under_the_hood.png HTTP/1.1" 200 4010 " http://localhost:8080/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060419 Fedora/ Firefox/ pango-text" """

It seems as though CherryPy? isn't flushing the whole image to Firefox, although it thinks it has (or Firefox isn't accepting the whole image from CherryPy?). The .png file that I replaced tg_under_the_hood.png with that then worked was very small - 253 bytes vs 4010 bytes.

comment:3 Changed 13 years ago by godoy

Hmmm... Can you please post the output of tg-admin info here, please?

Also, do you have some kind of proxy configured in your browser? If you do, can you please disable it and try again to see if the problem happens?

Another thest with an image with approximately the same size as the original logo would be interesting (I'd try with one as near as possible to 4010 bytes and with one a bit above 4096 bytes if I were you...).

comment:4 Changed 13 years ago by anonymous

Hmm indeed! - and no, there's no proxy configured in my browser.

The smallest range of image sizes I could narrow the problem down to is images <= 3445 bytes work fine, images >= 3724 bytes do not display, and the browser sits waiting for the server. (These are images used in other web pages that my browser displays correctly.)

tg-admin info gives:

[mark@no dodo]$ tg-admin info
TurboGears 0.9a5
ConfigObj 4.3.1
RuleDispatch 0.5a0.dev-r2115
setuptools 0.6a11
FormEncode 0.5.1
cElementTree 1.0.5-20051216
PasteScript 0.5.1
elementtree 1.2.6
simplejson 1.3
SQLObject 0.7.1dev-r1457
CherryPy 2.2.1
TurboKid 0.9.5
TurboJson 0.9.2
PyProtocols 1.0a0
Cheetah 1.0
PasteDeploy 0.5
Paste 0.5
FormEncode 0.5.1
kid 0.9.1
elementtree 1.2.6

comment:5 Changed 13 years ago by godoy

Sorry for asking so much, but I'm on a marathon here to deliver some code and I have to completely change my focus to help you. For images bigger than 3724 bytes, have you tried images bigger than 10 kBytes?

I believe you got where I was wanting to get: some buffering problem. I don't remember where I read about it...

Anyway, you'd better ping guys from CherryPy?, they might take a look at it if they haven't already. (BTW, have you looked in their docs to see if there's something that can be done?)

comment:6 Changed 13 years ago by anonymous

Yes, I've tried images around 10k and around 18k - both fail. Further information - it only seems to occur when the TG server and the browser are running on the same machine - definitely a buffering problem. Sorry to drag you away from your marathon - and thanks greatly for your help! TG looks to be a terrific system. I'll check the CherryPy? guys...

comment:7 Changed 13 years ago by godoy

Don't worry. :-)

Just as a side note, it doesn't happen to me here. Heve you tried a different browser or a newer version of your Firefox? Just to go eliminating things and narrowing it to CP already... But I didn't have this problem with FF before updating.

comment:8 Changed 13 years ago by mark.favas@…

I've reproduced the issue just using CP alone. I've mailed cherrypy-devel about it... Not tried a different browser yet.

comment:9 Changed 13 years ago by fumanchu

Here's a demo I wrote to demonstrate the problem (uses CP 3). Too bad it worked for me ;) If the OP could post demo code that fails, it would help a lot.

import os
import cherrypy
from cherrypy import tools

localdir = os.path.dirname(__file__)
png = os.path.join(localdir, "tg_under_the_hood.png")

class Root:
    def index(self):
        return "<img src='/tg_under_the_hood.png' />"
    index.exposed = True
    tg_under_the_hood_png = tools.staticfile.handler(filename=png, root=os.getcwd())

        'log_to_screen': True,
        'environment': 'production',

comment:10 Changed 13 years ago by jorge.vargas

Mark any updates on this? if you open a CP ticket please post the number here so we can track it.

comment:11 Changed 13 years ago by max

May be the proxy or internet connection is cause of the problem? It tries to fetch the image and just hangs?

comment:12 Changed 12 years ago by jorge.vargas

  • Status changed from new to closed
  • Resolution set to invalid

this can't be reproduced and the original poster never reply back, so without furder prove this is gone.

Note: See TracTickets for help on using tickets.