Loading ...
Sorry, an error occurred while loading the content.

[Cheetahtemplate-discuss] An error occured while using errorCatcher

Expand Messages
  • ro
    hi all I made a class as: from Cheetah.ErrorCatchers import ErrorCatcher as cheetah_errorcatcher class Cheetah_NoFound_Error_Catcher(cheetah_errorcatcher):
    Message 1 of 1 , Jun 27, 2007
    • 0 Attachment
      hi all

      I made a class as:

      from Cheetah.ErrorCatchers import ErrorCatcher as cheetah_errorcatcher
      class Cheetah_NoFound_Error_Catcher(cheetah_errorcatcher):
      """Define a class to catch the not found error and echo a blank string."""

      def warn(self, exc_val, code, rawCode, lineCol):
      return ''

      And create a template by:
      return cheetah_template(template.encode('utf-8'),
      searchList=[sdict],
      filter=Cheetah_EncodeUnicode_Filter,
      errorCatcher=Cheetah_NoFound_Error_Catcher)

      It occured an error:

      File "d:\python25\lib\site-packages\Cheetah-2.0rc8-py2.5-win32.egg\Cheetah\Template.py",
      line 1199, in __init__
      _preBuiltSearchList=_preBuiltSearchList)
      File "d:\python25\lib\site-packages\Cheetah-2.0rc8-py2.5-win32.egg\Cheetah\Template.py",
      line 1453, in _initCheetahInstance
      self._CHEETAH__errorCatchers[errorCatcher.__class__.__name__] = ec
      AttributeError: class Cheetah_NoFound_Error_Catcher has no attribute '__class__'

      I have googled this error and it seems a old bug that somebody reported in 2004.
      Is it same bug?

      --
      with kind regards

      -------------------------------------------------------------------------
      This SF.net email is sponsored by DB2 Express
      Download DB2 Express C - the FREE version of DB2 express and take
      control of your XML. No limits. Just data. Click to get it now.
      http://sourceforge.net/powerbar/db2/
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    Your message has been successfully submitted and would be delivered to recipients shortly.