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

[Cheetahtemplate-discuss] Cheetah Error. Please Help

Expand Messages
  • Huy Do
    Hi, I ran into this problem and am having problems tracing what the problem is. All I m doing is as follows: 1. Create a template object. 2. Add a searh list
    Message 1 of 2 , Jul 28, 2002
    • 0 Attachment
      Hi,

      I ran into this problem and am having problems tracing what the problem is.
      All I'm doing is as follows:

      1. Create a template object.
      2. Add a searh list to the template object using obj.addToSearchList.
      3. Searchlist is a tuple return from psycopg
      55 query = "select * from %s limit 100" % tname
      56 curs = conn.cursor()
      57 curs.execute(query)
      58 result = curs.fetchall()
      59 if result is None:
      60 result = []
      61 obj = aTemplate()
      62 obj.addToSearchList("rows", result)
      63 print obj

      What's weird is the following:

      1. Same code works for all other result sets except one.
      2. The only difference with this result set is that it has many columns
      (50).

      Can anyone help me ? I'm using version "Cheetah 0.9.14b1" and Python 2.2.1

      Thanks

      Huy


      File
      "/usr/local/python/lib/python2.2/site-packages/Webware/Cheetah/Template.py",
      line 103, in __init__
      CheckKeywords(KWs, self._legalKWs, 'Template constructor argument')
      File
      "/usr/local/python/lib/python2.2/site-packages/Webware/Cheetah/Utils/Misc.py
      ", line 77, in CheckKeywords
      for k in dic.keys(): # Can be dic.iterkeys() if Python >= 2.2.
      TypeError: expected string or Unicode object, NoneType found

      **************************************************
      This e-mail ("E-mail") (including any attachments) is confidential and may
      be privileged. If you are not a named recipient please immediately delete
      the E-mail and notify Tramada Systems Pty. Ltd. at info@... or by
      telephone to Sydney, Australia on +61 2 9693 5544.

      Tramada Systems Pty. Ltd. does not represent or warrant the security of the
      E-mail or that it is free from viruses or other faults or defects.

      Any views or opinions represented in this E-mail are solely those of the
      author and do not necessarily represent those of Tramada Systems Pty. Ltd.
      **************************************************



      -------------------------------------------------------
      This sf.net email is sponsored by: Dice - The leading online job board
      for high-tech professionals. Search and apply for tech jobs today!
      http://seeker.dice.com/seeker.epl?rel_code=31
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Huy Do
      Sorry Everyone, It was a bug in psycopg with NULL timestamps/fields. Thanks Huy ... This sf.net email is sponsored by: Dice - The leading online job board for
      Message 2 of 2 , Jul 28, 2002
      • 0 Attachment
        Sorry Everyone,

        It was a bug in psycopg with NULL timestamps/fields.

        Thanks

        Huy

        > -----Original Message-----
        > From: cheetahtemplate-discuss-admin@...
        > [mailto:cheetahtemplate-discuss-admin@...]On Behalf Of
        > Huy Do
        > Sent: Sunday, 28 July 2002 5:16 PM
        > To: Cheetah Template List
        > Subject: [Cheetahtemplate-discuss] Cheetah Error. Please Help
        >
        >
        > Hi,
        >
        > I ran into this problem and am having problems tracing what the
        > problem is.
        > All I'm doing is as follows:
        >
        > 1. Create a template object.
        > 2. Add a searh list to the template object using obj.addToSearchList.
        > 3. Searchlist is a tuple return from psycopg
        > 55 query = "select * from %s limit 100" % tname
        > 56 curs = conn.cursor()
        > 57 curs.execute(query)
        > 58 result = curs.fetchall()
        > 59 if result is None:
        > 60 result = []
        > 61 obj = aTemplate()
        > 62 obj.addToSearchList("rows", result)
        > 63 print obj
        >
        > What's weird is the following:
        >
        > 1. Same code works for all other result sets except one.
        > 2. The only difference with this result set is that it has many columns
        > (50).
        >
        > Can anyone help me ? I'm using version "Cheetah 0.9.14b1" and Python 2.2.1
        >
        > Thanks
        >
        > Huy
        >
        >
        > File
        > "/usr/local/python/lib/python2.2/site-packages/Webware/Cheetah/Tem
        > plate.py",
        > line 103, in __init__
        > CheckKeywords(KWs, self._legalKWs, 'Template constructor argument')
        > File
        > "/usr/local/python/lib/python2.2/site-packages/Webware/Cheetah/Uti
        > ls/Misc.py
        > ", line 77, in CheckKeywords
        > for k in dic.keys(): # Can be dic.iterkeys() if Python >= 2.2.
        > TypeError: expected string or Unicode object, NoneType found
        >
        > **************************************************
        > This e-mail ("E-mail") (including any attachments) is confidential and may
        > be privileged. If you are not a named recipient please immediately delete
        > the E-mail and notify Tramada Systems Pty. Ltd. at info@... or by
        > telephone to Sydney, Australia on +61 2 9693 5544.
        >
        > Tramada Systems Pty. Ltd. does not represent or warrant the
        > security of the
        > E-mail or that it is free from viruses or other faults or defects.
        >
        > Any views or opinions represented in this E-mail are solely those of the
        > author and do not necessarily represent those of Tramada Systems Pty. Ltd.
        > **************************************************
        >
        >
        >
        > -------------------------------------------------------
        > This sf.net email is sponsored by: Dice - The leading online job board
        > for high-tech professionals. Search and apply for tech jobs today!
        > http://seeker.dice.com/seeker.epl?rel_code=31
        > _______________________________________________
        > Cheetahtemplate-discuss mailing list
        > Cheetahtemplate-discuss@...
        > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        >



        -------------------------------------------------------
        This sf.net email is sponsored by: Dice - The leading online job board
        for high-tech professionals. Search and apply for tech jobs today!
        http://seeker.dice.com/seeker.epl?rel_code=31
        _______________________________________________
        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.