Zope import PythonScript.standard unauthorized

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lucas Branca

    #1

    Zope import PythonScript.standard unauthorized

    Hi,

    I've just insalled Zope to test a web application by thirdy part ....
    well .... it's very embarrassing cause I'm not able to
    see it at work because of Zope ..... (yeah... I'm really newbie :( )

    I found out that the problem is in Products/PythonScript permission.
    To test them, in the ZMI, I created this script and then I tested it

    =============== =============== =============== =
    SCRIPT
    =============== =============== =============== =
    # Example code:
    from Products.Python Scripts.standar d import html_quote, urlencode
    return 1

    =============== =============== =============== =
    OUTPUT DU TEST
    =============== =============== =============== =
    Zope has encountered an error while publishing this resource.

    Error Type: ImportError
    Error Value: import of "urlencode" from "Products.Pytho nScripts.standa rd" is
    unauthorized




    In Zope Bible they say there is a trick to escape this control
    using "External Methods", but it should be another way
    because the application I have to test doesn't use them at all ...

    any useful suggestion ..........?


    Thank you very
    Lucas

    btw:
    Zope = Zope 2.5.1
    Python= 2.1.3


  • Evan Simpson

    #2
    Re: Zope import PythonScript.st andard unauthorized

    Lucas Branca wrote:[color=blue]
    > I've just insalled Zope to test a web application by thirdy part ....
    > well .... it's very embarrassing cause I'm not able to
    > see it at work because of Zope ..... (yeah... I'm really newbie :( )[/color]

    You're more likely to get help with Zope problems from one of the Zope
    mailing lists.
    [color=blue]
    > # Example code:
    > from Products.Python Scripts.standar d import html_quote, urlencode
    > return 1[/color]

    Works for me -- what version of Zope and Python are you using?

    Cheers,

    Evan @ 4-am



    Comment

    • Lucas Branca

      #3
      Re: Zope import PythonScript.st andard unauthorized

      > You're more likely to get help with Zope problems from one of the Zope[color=blue]
      > mailing lists.
      >[color=green]
      > > # Example code:
      > > from Products.Python Scripts.standar d import html_quote, urlencode
      > > return 1[/color]
      >
      > Works for me -- what version of Zope and Python are you using?
      >[/color]

      on Debian woody I installed :
      Zope version = Zope 2.5.1
      Python version = 2.1.3

      and I'm not having "a really good time" with it .... :(
      Ok..... let's look at Zope site then ........

      Thx
      Lucas


      Comment

      • Lucas Branca

        #4
        Re: Zope import PythonScript.st andard unauthorized

        > I found out that the problem is in Products/PythonScript permission.[color=blue]
        > To test them, in the ZMI, I created this script and then I tested it
        >
        > =============== =============== =============== =
        > SCRIPT
        > =============== =============== =============== =
        > # Example code:
        > from Products.Python Scripts.standar d import html_quote, urlencode
        > return 1
        >
        > =============== =============== =============== =
        > OUTPUT DU TEST
        > =============== =============== =============== =
        > Zope has encountered an error while publishing this resource.
        >
        > Error Type: ImportError
        > Error Value: import of "urlencode" from "Products.Pytho nScripts.standa rd"[/color]
        is[color=blue]
        > unauthorized
        >[/color]

        OK.... if somebody else have same problem and Googling come here,
        that's the way I went (and now all works)

        on Debian I used package for Zope (2.5.1) and Python (2.1.3) from woody
        and I received the error above

        now I removed debian zope package ( :( sigh sigh ) ,
        and I 'm using

        Finally, all works fine .....

        Lucas




        Comment

        • Evan Simpson

          #5
          Re: Zope import PythonScript.st andard unauthorized

          Lucas Branca wrote:[color=blue]
          > now I removed debian zope package ( :( sigh sigh ) ,
          > and I 'm using
          > http://zope.org/Products/Zope/2.6.2/...linux2-x86.tgz[/color]

          As a fellow Debian user I feel your pain, but Zope is a prime example of
          software that you're really better off installing from the source
          tarball. The Zope Corp. folks have worked *very* hard to make
          installing and running Zope as easy as they can, and version 2.6 is more
          stable than the 2.5.1 in Debian "stable".

          Cheers,

          Evan @ 4-am



          Comment

          • Lucas Branca

            #6
            Re: Zope import PythonScript.st andard unauthorized


            "Evan Simpson" <evan@4-am.com> wrote in message
            news:mailman.10 5.1071248121.93 07.python-list@python.org ...[color=blue][color=green]
            > > now I removed debian zope package ( :( sigh sigh ) ,
            > > and I 'm using
            > > http://zope.org/Products/Zope/2.6.2/...linux2-x86.tgz[/color]
            >
            > As a fellow Debian user I feel your pain, but Zope is a prime example of
            > software that you're really better off installing from the source
            > tarball. The Zope Corp. folks have worked *very* hard to make
            > installing and running Zope as easy as they can, and version 2.6 is more
            > stable than the 2.5.1 in Debian "stable".[/color]

            That's good to know.
            Actually, installing Zope from the tar is a quick and clean operation.
            At the end, I have all in one directory and I can have a happy life with
            it, too ;)
            Great work!

            Regards
            Lucas


            Comment

            Working...