I'm having quasi-random re-occurrences of this problem again even after SVN upping last night.

- jmj


Jeremy Jones wrote:

I'm working on the shopping cart for my wife's website (which I'll soon extract for the community) and keep running into something. When I modify a piece of session data then hit a specific page again, I get this error in the browser:


   500 Internal error

Server got itself in trouble

Traceback (most recent call last):
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py", line 271, in run
   main()
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py", line 502, in main
   body = page_handler(*args, **cherrypy.request.paramMap)
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/TurboGears-0.9a0dev_r425-py2.4.egg/turbogears/controllers.py", line 242, in newfunc
   html, *args, **kw)
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/TurboGears-0.9a0dev_r425-py2.4.egg/turbogears/database.py", line 189, in run_with_transaction
   retval = func(*args, **kw)
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/TurboGears-0.9a0dev_r425-py2.4.egg/turbogears/controllers.py", line 262, in _execute_func
   return _process_output(tg_format, output, html)
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/TurboGears-0.9a0dev_r425-py2.4.egg/turbogears/controllers.py", line 64, in _process_output
   output = view.render(output, tg_format, template=template)
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/TurboGears-0.9a0dev_r425-py2.4.egg/turbogears/view.py", line 56, in render
   return engine.render(info, format, fragment, template)
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/TurboGears-0.9a0dev_r425-py2.4.egg/turbogears/kidsupport.py", line 141, in render return t.serialize(encoding=self.defaultencoding, output=format, fragment=fragment) File "/usr/local/apps/python2.4/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/__init__.py", line 232, in serialize
   return serializer.serialize(self, encoding, fragment)
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/serialization.py", line 51, in serialize
   text = list(self.generate(stream, encoding, fragment))
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/serialization.py", line 316, in generate
   stream = iter(stream)
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/__init__.py", line 257, in __iter__
   return iter(self.transform())
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/__init__.py", line 312, in transform
   stream = self.pull()
File "/usr/local/apps/python2.4/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/__init__.py", line 271, in pull
   self.initialize()
File "/home/jmjones/svn/home/pppweb/trunk/pppwebproject/tg/pppweb/pppweb/templates/view_cart.py", line 19, in initialize File "/home/jmjones/svn/home/pppweb/trunk/pppwebproject/tg/pppweb/pppweb/templates/master.py", line 21, in initialize
TypeError: 'NoneType' object is not callable


This is a huge pain to debug because .... how can I get at what's going on? I've tried a suggestion someone posted here of dropping into IPython through an IPShellEmbed() call. I can call IPShellEmbed() from within the controller and it shows me what's going on inside the controller. I've put the same thing in the offending template, but if the error is occurring inside the template, it never gets called.

I guess I could look at templates/master.py .... oh, that's right - it doesn't exist. I just googled and didn't find a flag to turn on generation of .py files from Kid. If someone knows how, I'd appreciate some insite. I guess I'm about to dig into kid/__init__.py to see if I can track down more of what's going on... Just thought I'd take a moment to whine while it's fresh on my frustration list.


- jmj


Reply via email to