500 Server error with IFrames?

5 views
Skip to first unread message

wul...@gmail.com

unread,
Jun 10, 2006, 4:05:25 AM6/10/06
to TurboGears
I seem to have a very strange error and I cannot figure it out.

Firstly I created a *.kid page which is passed some DB vars to display
in a table. (this file called widget.kid).
Secondly I create another *.kid page (the top level page) which has
several (5+) IFRAMES which embed the above widget page.

The problem I have having is that on a page refresh for the top level
page, one or more of the IFRAMES randomly returns a "500 internal
error". Sometimes all IFRAMES load properly (no errors), sometimes one
(random selection) returns the error, and sometimes more than one
return the error.

When the IFRAME loads properly, all the content is there and is also
formatted correctly. I have no other problems with the pages.

Yes I have restarted the server after any changes to my files. I am
using TG Alpha 0.9x on OSX 10.3 867Mhz G4.

Does anybody have any clue what might be the problem?

Below is the error message itself.
------------------------------------------------------------------------------------------------

500 Internal error

The server encountered an unexpected condition which prevented it from
fulfilling the request.

Page handler: <bound method Root.widget of <MYSTUFF.controllers.Root
object at 0x13d8530>>
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
line 105, in _run
self.main()
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
line 254, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in widget
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py",
line 273, in expose
output = database.run_with_transaction(
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/database.py",
line 221, in run_with_transaction
retval = func(*args, **kw)
File "<string>", line 5, in _expose
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py",
line 290, in <lambda>
mapping, fragment, *args, **kw)))
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py",
line 324, in _execute_func
return _process_output(output, template, format, content_type,
mapping, fragment)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py",
line 65, in _process_output
fragment=fragment)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/view/base.py",
line 131, in render
return engine.render(**kw)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboKid-0.9.5-py2.4.egg/turbokid/kidsupport.py",
line 156, in render
return t.serialize(encoding=self.defaultencoding, output=format,
fragment=fragment)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/__init__.py",
line 236, in serialize
return serializer.serialize(self, encoding, fragment)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/serialization.py",
line 51, in serialize
text = list(self.generate(stream, encoding, fragment))
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/serialization.py",
line 327, in generate
for ev, item in self.apply_filters(stream):
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/serialization.py",
line 84, in balancing_filter
for ev, item in stream:
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py",
line 206, in _coalesce
for ev, item in stream:
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/filter.py",
line 21, in transform_filter
for ev, item in apply_matches(stream, template, templates,
apply_func):
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/filter.py",
line 25, in apply_matches
for ev, item in stream:
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py",
line 164, in _track
for p in stream:
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py",
line 206, in _coalesce
for ev, item in stream:
File
"/Users/jackwu/Sites/wcharts/src/MYSTUFF/MYSTUFF/templates/widget.py",
line 119, in _pull
TypeError: 'NoneType' object is not callable

Powered by CherryPy 2.2.1
------------------------------------------------------------------------------------------------

Jorge Vargas

unread,
Jun 10, 2006, 12:17:20 PM6/10/06
to turbo...@googlegroups.com
I'm not 100% sure this is the same problem but I have seen
TypeError: 'NoneType' object is not callable
before
do a search for that on the mailing list archive, it seems to be one of those bugs that something happen but not all the time.

"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/CherryPy- 2.2.1-py2.4.egg/cherrypy/_cphttptools.py",

line 105, in _run
    self.main()
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
line 254, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in widget
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears- 0.9a6-py2.4.egg/turbogears/controllers.py",

line 273, in expose
    output = database.run_with_transaction(
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears- 0.9a6-py2.4.egg/turbogears/database.py",

line 221, in run_with_transaction
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears- 0.9a6-py2.4.egg/turbogears/controllers.py",

line 290, in <lambda>
    mapping, fragment, *args, **kw)))
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears- 0.9a6-py2.4.egg/turbogears/controllers.py",

line 324, in _execute_func
    return _process_output(output, template, format, content_type,
mapping, fragment)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears- 0.9a6-py2.4.egg/turbogears/controllers.py",

line 65, in _process_output
    fragment=fragment)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg /turbogears/view/base.py",

line 131, in render
    return engine.render(**kw)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboKid-0.9.5-py2.4.egg/turbokid/kidsupport.py",
line 156, in render
    return t.serialize(encoding=self.defaultencoding, output=format,
fragment=fragment)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg /kid/__init__.py",

line 236, in serialize
    return serializer.serialize(self, encoding, fragment)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg /kid/serialization.py",

line 51, in serialize
    text = list(self.generate(stream, encoding, fragment))
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg /kid/serialization.py",

line 327, in generate
    for ev, item in self.apply_filters(stream):
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg /kid/serialization.py",

Wormtongue

unread,
Jul 1, 2006, 4:16:08 PM7/1/06
to TurboGears
So..

Does anyone know the solution?

I am using turbogears from SVN, it was a fresh install about a week
ago. Since then I have butted my head on the desk many times. At
first I thought it was because of this, then that, then the next thing,
but today, I am still getting these errors. I have searched the group
archives, but I have not found any real cause or solution.

It seems to be completely random. The only way I can fix it for now,
is to restart the server after removing all template.pyc files.

Wormtongue

unread,
Jul 2, 2006, 6:05:11 AM7/2/06
to turbo...@googlegroups.com
Hello all: My sorriest apologies.

This message was sent from the google site, in response to a thread
originally titled: "TypeError: 'NoneType' object is not
callable". I suppose I should have taken more care to check the
subject before spamming nearly 2000 people. It shan't happen again.

I was however, almost beside myself. I am still receiving these errors
on a completely random schedule. So far, since last night, I haven't
had too much of a problem, but, at one stage, my site was virtually
undevelopable. I would remove .pyc files and re-touch all others (I
have a batch script to do so now), to no avail. I am lost. I have seen
some notes on tentative fixes, but the paths mentioned do not exist in
my installation. I've seen also a few posts about things which don't
affect me at all, like items I do not have installed, etc.

At one stage, I thought that it was the following code, which should not
have a 'raise' before it (though it works, either way):

>>> from turbogears import redirect
>>> ...
>>> raise redirect(URL)

-- That seemed to clear the errors up sharp, for a while, but the
fragile peace was not to last.


Any help would be mightily appreciated.

Thanks (and sorry again for the bad email)!

Kevin Dangoor

unread,
Jul 3, 2006, 2:36:56 PM7/3/06
to turbo...@googlegroups.com
Just to double check, is the error you're getting the "NoneType
object is not callable" error?

I *think* the previous ones I've seen of this are usually Kid-
related. I'm not in a position right now to take a look deeper into
this, unfortunately (I still have some prep to do for EuroPython
tomorrow...)

Kevin


--
Kevin Dangoor
TurboGears / Zesty News

email: k...@blazingthings.com
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Reply all
Reply to author
Forward
0 new messages