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

Re: [Cheetahtemplate-discuss] Quickstart tutorial problem WinXP

Expand Messages
  • Mike Dewhirst
    ... It behaves identically on Linux. I must be making the same mistake. Mike ... Using Tomcat but need to do more? Need to support web services, security? Get
    Message 1 of 5 , Apr 24, 2006
    • 0 Attachment
      Mike Dewhirst wrote:
      > I'm trying to work through the 3.7 Quickstart tutorial on pages 14 and
      > 15 of the manual. Windows XP.
      >
      > It works up to a point but falls over with a "NameMapper.NotFound" error.
      >
      > I don't think I mistyped anything and the session with the error is
      > shown below. After the error I added an extra parameter to make it
      > similar to the first example and there was no apparent problem. I
      > suspect the tutorial was trying to demonstrate something else.
      >
      > I'll try the same thing on Linux and see.

      It behaves identically on Linux.

      I must be making the same mistake.

      Mike

      >
      > Any ideas?
      >
      > Mike
      >
      > C:\test\cheetah>python
      > Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on
      > win32
      > Type "help", "copyright", "credits" or "license" for more information.
      > >>> from Cheetah.Template import Template
      > >>> templateDef = """
      > ... <html>
      > ... <head><title>$title</title></head>
      > ... <body>
      > ... $contents
      > ... </body>
      > ... </html>"""
      > >>> nameSpace = {'title': 'Hello World Example', 'contents': 'Hello
      > World'}
      > >>> t1 = Template(templateDef, searchList=[nameSpace])
      > >>> print t1
      >
      > <html>
      > <head><title>Hello World Example</title></head>
      > <body>
      > Hello World
      > </body>
      > </html>
      > >>>
      > >>>
      > >>> class Template3(Template):
      > ... title = 'HW Example'
      > ... contents = 'H3llo World'
      > ...
      > >>> t3 = Template3(templateDef)
      > >>> print t3
      > Traceback (most recent call last):
      > File "<stdin>", line 1, in ?
      > File "C:\usr\bin\Lib\site-packages\Cheetah\Template.py", line 995, in
      > __str__
      > def __str__(self): return getattr(self, mainMethName)()
      > File "DynamicallyCompiledCheetahTemplate.py", line 87, in respond
      > NameMapper.NotFound: cannot find 'title'
      > >>>
      > >>> t3 = Template3(templateDef, searchList=[nameSpace])
      > >>> print t3
      >
      > <html>
      > <head><title>Hello World Example</title></head>
      > <body>
      > Hello World
      > </body>
      > </html>
      > >>>
      >
      >
      > -------------------------------------------------------
      > Using Tomcat but need to do more? Need to support web services, security?
      > Get stuff done quickly with pre-integrated technology to make your job
      > easier
      > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
      > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
      > _______________________________________________
      > Cheetahtemplate-discuss mailing list
      > Cheetahtemplate-discuss@...
      > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      >
      >



      -------------------------------------------------------
      Using Tomcat but need to do more? Need to support web services, security?
      Get stuff done quickly with pre-integrated technology to make your job easier
      Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
      http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Mike Dewhirst
      Sorry - should have mentioned Cheetah 2.0rc6 with version 1.0 docs ... Using Tomcat but need to do more? Need to support web services, security? Get stuff done
      Message 2 of 5 , Apr 24, 2006
      • 0 Attachment
        Sorry - should have mentioned Cheetah 2.0rc6 with version 1.0 docs

        Mike Dewhirst wrote:
        > Mike Dewhirst wrote:
        >> I'm trying to work through the 3.7 Quickstart tutorial on pages 14 and
        >> 15 of the manual. Windows XP.
        >>
        >> It works up to a point but falls over with a "NameMapper.NotFound" error.
        >>
        >> I don't think I mistyped anything and the session with the error is
        >> shown below. After the error I added an extra parameter to make it
        >> similar to the first example and there was no apparent problem. I
        >> suspect the tutorial was trying to demonstrate something else.
        >>
        >> I'll try the same thing on Linux and see.
        >
        > It behaves identically on Linux.
        >
        > I must be making the same mistake.
        >
        > Mike
        >
        >>
        >> Any ideas?
        >>
        >> Mike
        >>
        >> C:\test\cheetah>python
        >> Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]
        >> on win32
        >> Type "help", "copyright", "credits" or "license" for more information.
        >> >>> from Cheetah.Template import Template
        >> >>> templateDef = """
        >> ... <html>
        >> ... <head><title>$title</title></head>
        >> ... <body>
        >> ... $contents
        >> ... </body>
        >> ... </html>"""
        >> >>> nameSpace = {'title': 'Hello World Example', 'contents': 'Hello
        >> World'}
        >> >>> t1 = Template(templateDef, searchList=[nameSpace])
        >> >>> print t1
        >>
        >> <html>
        >> <head><title>Hello World Example</title></head>
        >> <body>
        >> Hello World
        >> </body>
        >> </html>
        >> >>>
        >> >>>
        >> >>> class Template3(Template):
        >> ... title = 'HW Example'
        >> ... contents = 'H3llo World'
        >> ...
        >> >>> t3 = Template3(templateDef)
        >> >>> print t3
        >> Traceback (most recent call last):
        >> File "<stdin>", line 1, in ?
        >> File "C:\usr\bin\Lib\site-packages\Cheetah\Template.py", line 995,
        >> in __str__
        >> def __str__(self): return getattr(self, mainMethName)()
        >> File "DynamicallyCompiledCheetahTemplate.py", line 87, in respond
        >> NameMapper.NotFound: cannot find 'title'
        >> >>>
        >> >>> t3 = Template3(templateDef, searchList=[nameSpace])
        >> >>> print t3
        >>
        >> <html>
        >> <head><title>Hello World Example</title></head>
        >> <body>
        >> Hello World
        >> </body>
        >> </html>
        >> >>>
        >>
        >>
        >> -------------------------------------------------------
        >> Using Tomcat but need to do more? Need to support web services, security?
        >> Get stuff done quickly with pre-integrated technology to make your job
        >> easier
        >> Download IBM WebSphere Application Server v.1.0.1 based on Apache
        >> Geronimo
        >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
        >> _______________________________________________
        >> Cheetahtemplate-discuss mailing list
        >> Cheetahtemplate-discuss@...
        >> https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        >>
        >>
        >
        >
        >
        > -------------------------------------------------------
        > Using Tomcat but need to do more? Need to support web services, security?
        > Get stuff done quickly with pre-integrated technology to make your job
        > easier
        > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
        > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
        > _______________________________________________
        > Cheetahtemplate-discuss mailing list
        > Cheetahtemplate-discuss@...
        > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        >
        >



        -------------------------------------------------------
        Using Tomcat but need to do more? Need to support web services, security?
        Get stuff done quickly with pre-integrated technology to make your job easier
        Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
        http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Mike Orr
        ... That must have broken at some point because it looks like a bug. The NameMapper should have found the class attributes. Nevertheless, it s an uncommon
        Message 3 of 5 , Apr 24, 2006
        • 0 Attachment
          On 4/24/06, Mike Dewhirst <miked@...> wrote:
          > I'm trying to work through the 3.7 Quickstart tutorial on pages 14 and
          > 15 of the manual. Windows XP.
          >
          > It works up to a point but falls over with a "NameMapper.NotFound" error.
          >
          > I don't think I mistyped anything and the session with the error is
          > shown below. After the error I added an extra parameter to make it
          > similar to the first example and there was no apparent problem. I
          > suspect the tutorial was trying to demonstrate something else.
          >
          > I'll try the same thing on Linux and see.
          >
          > Any ideas?
          >
          > Mike
          >
          > C:\test\cheetah>python
          > Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on
          > win32
          > Type "help", "copyright", "credits" or "license" for more information.
          > >>> from Cheetah.Template import Template
          > >>> templateDef = """
          > ... <html>
          > ... <head><title>$title</title></head>
          > ... <body>
          > ... $contents
          > ... </body>
          > ... </html>"""
          > >>> nameSpace = {'title': 'Hello World Example', 'contents': 'Hello World'}
          > >>> t1 = Template(templateDef, searchList=[nameSpace])
          > >>> print t1
          >
          > <html>
          > <head><title>Hello World Example</title></head>
          > <body>
          > Hello World
          > </body>
          > </html>
          > >>>
          > >>>
          > >>> class Template3(Template):
          > ... title = 'HW Example'
          > ... contents = 'H3llo World'
          > ...
          > >>> t3 = Template3(templateDef)
          > >>> print t3
          > Traceback (most recent call last):
          > File "<stdin>", line 1, in ?
          > File "C:\usr\bin\Lib\site-packages\Cheetah\Template.py", line 995, in
          > __str__
          > def __str__(self): return getattr(self, mainMethName)()
          > File "DynamicallyCompiledCheetahTemplate.py", line 87, in respond
          > NameMapper.NotFound: cannot find 'title'
          > >>>
          > >>> t3 = Template3(templateDef, searchList=[nameSpace])
          > >>> print t3
          >
          > <html>
          > <head><title>Hello World Example</title></head>
          > <body>
          > Hello World
          > </body>
          > </html>

          That must have broken at some point because it looks like a bug. The
          NameMapper should have found the class attributes.

          Nevertheless, it's an uncommon usage and has been taken out of the 2.0
          Quickstart. The new docs -- or at least the chapters that have been
          written -- are at
          http://cheetahtemplate.sourceforge.net/docs-2.0-unfinished/ . Ignore
          the reduncancies and typos.

          --
          Mike Orr <sluggoster@...>
          (mso@... address is semi-reliable)


          -------------------------------------------------------
          Using Tomcat but need to do more? Need to support web services, security?
          Get stuff done quickly with pre-integrated technology to make your job easier
          Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
          http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
          _______________________________________________
          Cheetahtemplate-discuss mailing list
          Cheetahtemplate-discuss@...
          https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        • Mike Dewhirst
          Thanks Mike - I ll check out the new docs. Regards mike ... Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly
          Message 4 of 5 , Apr 24, 2006
          • 0 Attachment
            Thanks Mike - I'll check out the new docs.

            Regards

            mike

            Mike Orr wrote:
            > On 4/24/06, Mike Dewhirst <miked@...> wrote:
            >> I'm trying to work through the 3.7 Quickstart tutorial on pages 14 and
            >> 15 of the manual. Windows XP.
            >>
            >> It works up to a point but falls over with a "NameMapper.NotFound" error.
            >>
            >> I don't think I mistyped anything and the session with the error is
            >> shown below. After the error I added an extra parameter to make it
            >> similar to the first example and there was no apparent problem. I
            >> suspect the tutorial was trying to demonstrate something else.
            >>
            >> I'll try the same thing on Linux and see.
            >>
            >> Any ideas?
            >>
            >> Mike
            >>
            >> C:\test\cheetah>python
            >> Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on
            >> win32
            >> Type "help", "copyright", "credits" or "license" for more information.
            >> >>> from Cheetah.Template import Template
            >> >>> templateDef = """
            >> ... <html>
            >> ... <head><title>$title</title></head>
            >> ... <body>
            >> ... $contents
            >> ... </body>
            >> ... </html>"""
            >> >>> nameSpace = {'title': 'Hello World Example', 'contents': 'Hello World'}
            >> >>> t1 = Template(templateDef, searchList=[nameSpace])
            >> >>> print t1
            >>
            >> <html>
            >> <head><title>Hello World Example</title></head>
            >> <body>
            >> Hello World
            >> </body>
            >> </html>
            >> >>>
            >> >>>
            >> >>> class Template3(Template):
            >> ... title = 'HW Example'
            >> ... contents = 'H3llo World'
            >> ...
            >> >>> t3 = Template3(templateDef)
            >> >>> print t3
            >> Traceback (most recent call last):
            >> File "<stdin>", line 1, in ?
            >> File "C:\usr\bin\Lib\site-packages\Cheetah\Template.py", line 995, in
            >> __str__
            >> def __str__(self): return getattr(self, mainMethName)()
            >> File "DynamicallyCompiledCheetahTemplate.py", line 87, in respond
            >> NameMapper.NotFound: cannot find 'title'
            >> >>>
            >> >>> t3 = Template3(templateDef, searchList=[nameSpace])
            >> >>> print t3
            >>
            >> <html>
            >> <head><title>Hello World Example</title></head>
            >> <body>
            >> Hello World
            >> </body>
            >> </html>
            >
            > That must have broken at some point because it looks like a bug. The
            > NameMapper should have found the class attributes.
            >
            > Nevertheless, it's an uncommon usage and has been taken out of the 2.0
            > Quickstart. The new docs -- or at least the chapters that have been
            > written -- are at
            > http://cheetahtemplate.sourceforge.net/docs-2.0-unfinished/ . Ignore
            > the reduncancies and typos.
            >
            > --
            > Mike Orr <sluggoster@...>
            > (mso@... address is semi-reliable)
            >
            >
            > -------------------------------------------------------
            > Using Tomcat but need to do more? Need to support web services, security?
            > Get stuff done quickly with pre-integrated technology to make your job easier
            > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
            > http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
            > _______________________________________________
            > Cheetahtemplate-discuss mailing list
            > Cheetahtemplate-discuss@...
            > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
            >
            >



            -------------------------------------------------------
            Using Tomcat but need to do more? Need to support web services, security?
            Get stuff done quickly with pre-integrated technology to make your job easier
            Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
            http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
            _______________________________________________
            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.