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

[Cheetahtemplate-discuss] Cheetah test failure

Expand Messages
  • Robert Lilly
    Hello, I just installed Cheetah and am following the User Guide. I got as far as step 3.6 - Testing your installation. Cheetah failed miserably. The results
    Message 1 of 7 , Oct 2, 2003
    • 0 Attachment
      Hello,

      I just installed Cheetah and am following the User Guide. I got as far
      as step 3.6 - Testing your installation. Cheetah failed miserably. The
      results are attached.
      OS = Windows 2000 Pro SP4
      Python Version = 2.3.1 (also tried with 2.3.2c1 - same results)
      Cheetah Version = 0.9.15
      Environment Variables include:
      Path=%path%;f:\python;f:\python\scripts
      PYTHON_PATH=F:\Python;F:\Python\scripts

      I have done no customizing to either Python or Cheetah.

      Hopefully this is a result of a dumb error on my part and you can get me
      fixed up in a hurry. ;-)

      Thanks,

      Robert Lily
    • Mike Orr
      ... For ImportError: No module named temp , make sure you re running the test in a directory you have write permission in. It wants to test writing a module
      Message 2 of 7 , Oct 3, 2003
      • 0 Attachment
        On Thu, Oct 02, 2003 at 03:31:42PM -0700, Robert Lilly wrote:
        > I just installed Cheetah and am following the User Guide. I got as far
        > as step 3.6 - Testing your installation. Cheetah failed miserably. The
        > results are attached.

        For "ImportError: No module named temp", make sure you're running the
        test in a directory you have write permission in. It wants to test
        writing a module and reading it back in. I think there was another
        something to check for too when this happens but I don't remember what
        it is. Maybe somebody else on the list remembers. It was discussed
        within the past month, when somebody else had problems with the tests.

        "TypeError: update() takes exactly one argument (0 given)" is tricky
        to explain. There's a bug in Cheetah that makes $update match a
        dictionary method rather than the variable it's supposed to match.
        The same thing happens with any variable with the same name as a
        dictionary method; e.g., $clear. This test is skipped if you're
        using the C version of the NameMapper, so most ppl don't see the
        error. But you are falling back to the Python version of the
        NameMapper, which means it can't load the C version. I think I
        remember hearing that the C version doesn't work on Windows.
        Fixing this bug in both NameMapper versions is one of the main
        priorities for 1.0, but it has to wait till Tavis has time to do
        it. In the meantime, ignore the error and don't use any $placeholder
        names that match dictionary method names. (But $self.update should
        be OK, along with $something.update, etc.)

        'AssertionError: Template output mismatch: ..." is because Python 2.3
        changed the behavior of boolean values, and the tests haven't been
        updated yet. Ignore them. In Python >= 2.3, str(1==1) and str(1==0)
        print print "True" and "False" respectively rather than "1" and "0".

        "AssertionError: subcommand killed by signal 1: cheetah compile --flat
        child/a.tmpl" means what it says. The subcommand failed for some
        reason. Again, the current directory being not writable is the most
        likely culprit. All those subcommand tests want to write files and
        create subdirectories.

        That should cover it.

        --
        -Mike Orr (aka. Sluggo), mso@... (iron@...)
        http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol


        -------------------------------------------------------
        This sf.net email is sponsored by:ThinkGeek
        Welcome to geek heaven.
        http://thinkgeek.com/sf
        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Robert Lilly
        From: Tavis Rudd ... the ... to ... Thanks Tavis. After seeing the results of those tests I didn t go any further in trying it. I will
        Message 3 of 7 , Oct 4, 2003
        • 0 Attachment
          From: "Tavis Rudd" <tavis@...>

          >> I just installed Cheetah and am following the User Guide. I got as far
          >> as step 3.6 - Testing your installation. Cheetah failed miserably. The
          >> results are attached.
          >> OS = Windows 2000 Pro SP4
          >> Python Version = 2.3.1 (also tried with 2.3.2c1 - same results)
          >> Cheetah Version = 0.9.15
          >
          > Hi Robert,
          > this is a known issue with the test suite, but it doesn't appear to affect
          the
          > use of Cheetah according to our windows users. Mike and I, both Linux/BSD
          > users, don't have access to Windows development boxes and haven't had time
          to
          > look into it further.

          Thanks Tavis. After seeing the results of those tests I didn't go any
          further in trying it. I will give it a go and let you know if I have any
          problems.

          > If anyone out there is a Python-on-Win wizard and has time to look into
          it,
          > any help would be much appreciated.

          Unfortunately, I'm just learning Python, otherwise I would volunteer to do
          it.

          Thanks again,

          Robert



          -------------------------------------------------------
          This sf.net email is sponsored by:ThinkGeek
          Welcome to geek heaven.
          http://thinkgeek.com/sf
          _______________________________________________
          Cheetahtemplate-discuss mailing list
          Cheetahtemplate-discuss@...
          https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        • Robert Lilly
          From: Mike Orr ... I ll do a search to find the discussion you mention. I m running as Administrator on Windows 2000, so I have write permission
          Message 4 of 7 , Oct 4, 2003
          • 0 Attachment
            From: "Mike Orr" <mso@...>

            > On Thu, Oct 02, 2003 at 03:31:42PM -0700, Robert Lilly wrote:
            > > I just installed Cheetah and am following the User Guide. I got as far
            > > as step 3.6 - Testing your installation. Cheetah failed miserably. The
            > > results are attached.
            >
            > For "ImportError: No module named temp", make sure you're running the
            > test in a directory you have write permission in. It wants to test
            > writing a module and reading it back in. I think there was another
            > something to check for too when this happens but I don't remember what
            > it is. Maybe somebody else on the list remembers. It was discussed
            > within the past month, when somebody else had problems with the tests.

            I'll do a search to find the discussion you mention. I'm running as
            Administrator on Windows 2000, so I have write permission everywhere, so I
            doubt that is an issue.

            > "TypeError: update() takes exactly one argument (0 given)" is tricky
            > to explain. There's a bug in Cheetah that makes $update match a
            > dictionary method rather than the variable it's supposed to match.
            > The same thing happens with any variable with the same name as a
            > dictionary method; e.g., $clear. This test is skipped if you're
            > using the C version of the NameMapper, so most ppl don't see the
            > error. But you are falling back to the Python version of the
            > NameMapper, which means it can't load the C version. I think I
            > remember hearing that the C version doesn't work on Windows.
            > Fixing this bug in both NameMapper versions is one of the main
            > priorities for 1.0, but it has to wait till Tavis has time to do
            > it. In the meantime, ignore the error and don't use any $placeholder
            > names that match dictionary method names. (But $self.update should
            > be OK, along with $something.update, etc.)

            This is very helpful to know. I will make it a point to know the dictionary
            method names so as not to use them as $placeholder names. Are there any
            other key words or method names I should avoid using?

            > 'AssertionError: Template output mismatch: ..." is because Python 2.3
            > changed the behavior of boolean values, and the tests haven't been
            > updated yet. Ignore them. In Python >= 2.3, str(1==1) and str(1==0)
            > print print "True" and "False" respectively rather than "1" and "0".

            Got it. Thanks for the historical insight. It sure helps talking to someone
            who's got the inside track!

            > "AssertionError: subcommand killed by signal 1: cheetah compile --flat
            > child/a.tmpl" means what it says. The subcommand failed for some
            > reason. Again, the current directory being not writable is the most
            > likely culprit. All those subcommand tests want to write files and
            > create subdirectories.

            Again, I don't think write permissions are applicable here. Perhaps the
            tests were written to run on *nix systems and don't fully translate to the
            Win32 platform. I will be setting Cheetah up on a Linux box soon, and will
            see what kind of results I get with the tests on that platform.

            > That should cover it.
            >
            > --
            > -Mike Orr (aka. Sluggo)

            I think so. This information, combined with the fact that Tavis says
            everything seems to work fine in spite of those failure messages encourages
            me to give it a go. I'll report back if I have problems in actual usage.


            Thanks,

            Robert



            -------------------------------------------------------
            This sf.net email is sponsored by:ThinkGeek
            Welcome to geek heaven.
            http://thinkgeek.com/sf
            _______________________________________________
            Cheetahtemplate-discuss mailing list
            Cheetahtemplate-discuss@...
            https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
          • Jamieson Becker
            One more quick cool thing about Python. All that failure info was only related to one failure; Python was just trying to give you as much info as possible to
            Message 5 of 7 , Oct 4, 2003
            • 0 Attachment
              One more quick "cool thing" about Python. All that failure info was only
              related to one failure; Python was just trying to give you as much info as
              possible to help out. The most relevant info (like the exact file and line of
              code) is usually at the very end (bottom) of a failure report.

              The failure reports might be a bit intimidating after the one-liners of PHP or
              C, but you'll find them much more useful as you go on. Also, when you do get
              a failure report, read it carefully, especially the end of it. ;-) I can't
              tell you how many times I spent fifteen minutes trying to fix a bug and then
              went back and reread the bug report to realize that the clues were already
              right there.

              Good luck! Glad to see another newbie! ;-)

              On Sat October 4 2003 2:18 pm, Robert Lilly wrote:
              > From: "Tavis Rudd" <tavis@...>
              >
              > >> I just installed Cheetah and am following the User Guide. I got as far
              > >> as step 3.6 - Testing your installation. Cheetah failed miserably. The
              > >> results are attached.
              > >> OS = Windows 2000 Pro SP4
              > >> Python Version = 2.3.1 (also tried with 2.3.2c1 - same results)
              > >> Cheetah Version = 0.9.15
              > >
              > > Hi Robert,
              > > this is a known issue with the test suite, but it doesn't appear to
              > > affect
              >
              > the
              >
              > > use of Cheetah according to our windows users. Mike and I, both Linux/BSD
              > > users, don't have access to Windows development boxes and haven't had
              > > time
              >
              > to
              >
              > > look into it further.
              >
              > Thanks Tavis. After seeing the results of those tests I didn't go any
              > further in trying it. I will give it a go and let you know if I have any
              > problems.
              >
              > > If anyone out there is a Python-on-Win wizard and has time to look into
              >
              > it,
              >
              > > any help would be much appreciated.
              >
              > Unfortunately, I'm just learning Python, otherwise I would volunteer to do
              > it.
              >
              > Thanks again,
              >
              > Robert
              >
              >
              >
              > -------------------------------------------------------
              > This sf.net email is sponsored by:ThinkGeek
              > Welcome to geek heaven.
              > http://thinkgeek.com/sf
              > _______________________________________________
              > Cheetahtemplate-discuss mailing list
              > Cheetahtemplate-discuss@...
              > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss



              -------------------------------------------------------
              This sf.net email is sponsored by:ThinkGeek
              Welcome to geek heaven.
              http://thinkgeek.com/sf
              _______________________________________________
              Cheetahtemplate-discuss mailing list
              Cheetahtemplate-discuss@...
              https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
            • Jamieson Becker
              This is a good point. Is a list of Cheetah Reserved Words anywhere in the docs or Wiki? ... This sf.net email is sponsored by:ThinkGeek Welcome to geek
              Message 6 of 7 , Oct 4, 2003
              • 0 Attachment
                This is a good point. Is a list of "Cheetah Reserved Words" anywhere in the
                docs or Wiki?

                On Sat October 4 2003 2:28 pm, Robert Lilly wrote:
                > From: "Mike Orr" <mso@...>
                >
                > > On Thu, Oct 02, 2003 at 03:31:42PM -0700, Robert Lilly wrote:
                > > > I just installed Cheetah and am following the User Guide. I got as far
                > > > as step 3.6 - Testing your installation. Cheetah failed miserably. The
                > > > results are attached.
                > >
                > > For "ImportError: No module named temp", make sure you're running the
                > > test in a directory you have write permission in. It wants to test
                > > writing a module and reading it back in. I think there was another
                > > something to check for too when this happens but I don't remember what
                > > it is. Maybe somebody else on the list remembers. It was discussed
                > > within the past month, when somebody else had problems with the tests.
                >
                > I'll do a search to find the discussion you mention. I'm running as
                > Administrator on Windows 2000, so I have write permission everywhere, so I
                > doubt that is an issue.
                >
                > > "TypeError: update() takes exactly one argument (0 given)" is tricky
                > > to explain. There's a bug in Cheetah that makes $update match a
                > > dictionary method rather than the variable it's supposed to match.
                > > The same thing happens with any variable with the same name as a
                > > dictionary method; e.g., $clear. This test is skipped if you're
                > > using the C version of the NameMapper, so most ppl don't see the
                > > error. But you are falling back to the Python version of the
                > > NameMapper, which means it can't load the C version. I think I
                > > remember hearing that the C version doesn't work on Windows.
                > > Fixing this bug in both NameMapper versions is one of the main
                > > priorities for 1.0, but it has to wait till Tavis has time to do
                > > it. In the meantime, ignore the error and don't use any $placeholder
                > > names that match dictionary method names. (But $self.update should
                > > be OK, along with $something.update, etc.)
                >
                > This is very helpful to know. I will make it a point to know the dictionary
                > method names so as not to use them as $placeholder names. Are there any
                > other key words or method names I should avoid using?
                >
                > > 'AssertionError: Template output mismatch: ..." is because Python 2.3
                > > changed the behavior of boolean values, and the tests haven't been
                > > updated yet. Ignore them. In Python >= 2.3, str(1==1) and str(1==0)
                > > print print "True" and "False" respectively rather than "1" and "0".
                >
                > Got it. Thanks for the historical insight. It sure helps talking to someone
                > who's got the inside track!
                >
                > > "AssertionError: subcommand killed by signal 1: cheetah compile --flat
                > > child/a.tmpl" means what it says. The subcommand failed for some
                > > reason. Again, the current directory being not writable is the most
                > > likely culprit. All those subcommand tests want to write files and
                > > create subdirectories.
                >
                > Again, I don't think write permissions are applicable here. Perhaps the
                > tests were written to run on *nix systems and don't fully translate to the
                > Win32 platform. I will be setting Cheetah up on a Linux box soon, and will
                > see what kind of results I get with the tests on that platform.
                >
                > > That should cover it.
                > >
                > > --
                > > -Mike Orr (aka. Sluggo)
                >
                > I think so. This information, combined with the fact that Tavis says
                > everything seems to work fine in spite of those failure messages encourages
                > me to give it a go. I'll report back if I have problems in actual usage.
                >
                >
                > Thanks,
                >
                > Robert
                >
                >
                >
                > -------------------------------------------------------
                > This sf.net email is sponsored by:ThinkGeek
                > Welcome to geek heaven.
                > http://thinkgeek.com/sf
                > _______________________________________________
                > Cheetahtemplate-discuss mailing list
                > Cheetahtemplate-discuss@...
                > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss



                -------------------------------------------------------
                This sf.net email is sponsored by:ThinkGeek
                Welcome to geek heaven.
                http://thinkgeek.com/sf
                _______________________________________________
                Cheetahtemplate-discuss mailing list
                Cheetahtemplate-discuss@...
                https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
              • Mike Orr
                ... Those are the only ones that have come up. There was a problem previously with names identical to Python builtins, but that was fixed several months ago.
                Message 7 of 7 , Oct 4, 2003
                • 0 Attachment
                  On Sat, Oct 04, 2003 at 12:28:15PM -0700, Robert Lilly wrote:
                  > I will make it a point to know the dictionary
                  > method names so as not to use them as $placeholder names. Are there any
                  > other key words or method names I should avoid using?

                  Those are the only ones that have come up. There was a problem previously
                  with names identical to Python builtins, but that was fixed several months
                  ago.

                  There aren't any "reserved words" in Cheetah (to answer Jamieson's question).
                  The "dictionary methods" problem was an oversight in the implementation:
                  Cheetah prepends the "#set globals" dictionary to the searchList, so its
                  methods are visible, oops.

                  The only other potential problem is if you override a Template or
                  Webware method, you'll lose access to that service. That won't hurt
                  Cheetah because it doesn't use the searchList to access its essential
                  services, but does mean possibly losing a convenience method.

                  See the "Tips, Tricks and Troubleshooting" section in the Users' Guide.
                  Especially 12.4 (Calling superclass methods, and why you have to) and
                  12.5 (All methods).

                  --
                  -Mike Orr (aka. Sluggo), mso@... (iron@...)
                  http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol


                  -------------------------------------------------------
                  This sf.net email is sponsored by:ThinkGeek
                  Welcome to geek heaven.
                  http://thinkgeek.com/sf
                  _______________________________________________
                  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.