Zope import PythonScript.standard unauthorized

Discussion in 'Python' started by Lucas Branca, Dec 11, 2003.

  1. Lucas Branca

    Lucas Branca Guest

    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.PythonScripts.standard 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.PythonScripts.standard" 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
    Lucas Branca, Dec 11, 2003
    #1
    1. Advertising

  2. Lucas Branca

    Evan Simpson Guest

    Lucas Branca wrote:
    > 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 :( )


    You're more likely to get help with Zope problems from one of the Zope
    mailing lists.

    > # Example code:
    > from Products.PythonScripts.standard import html_quote, urlencode
    > return 1


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

    Cheers,

    Evan @ 4-am
    Evan Simpson, Dec 11, 2003
    #2
    1. Advertising

  3. Lucas Branca

    Lucas Branca Guest

    > You're more likely to get help with Zope problems from one of the Zope
    > mailing lists.
    >
    > > # Example code:
    > > from Products.PythonScripts.standard import html_quote, urlencode
    > > return 1

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


    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
    Lucas Branca, Dec 11, 2003
    #3
  4. Lucas Branca

    Lucas Branca Guest

    > 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.PythonScripts.standard 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.PythonScripts.standard"

    is
    > unauthorized
    >


    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
    http://zope.org/Products/Zope/2.6.2/Zope-2.6.2-linux2-x86.tgz
    Finally, all works fine .....

    Lucas
    Lucas Branca, Dec 12, 2003
    #4
  5. Lucas Branca

    Evan Simpson Guest

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


    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
    Evan Simpson, Dec 12, 2003
    #5
  6. Lucas Branca

    Lucas Branca Guest

    "Evan Simpson" <> wrote in message
    news:...
    > > now I removed debian zope package ( :( sigh sigh ) ,
    > > and I 'm using
    > > http://zope.org/Products/Zope/2.6.2/Zope-2.6.2-linux2-x86.tgz

    >
    > 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".


    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
    Lucas Branca, Dec 13, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shane Hathaway
    Replies:
    2
    Views:
    324
    Michael Hudson
    Aug 29, 2003
  2. jang, seungwook
    Replies:
    1
    Views:
    372
    Guido Goldstein
    Jan 15, 2004
  3. =?UTF-8?B?VGltdcOnaW4gS8SxesSxbGF5?=

    why there is no pythonscript insine web browsers?

    =?UTF-8?B?VGltdcOnaW4gS8SxesSxbGF5?=, Nov 12, 2007, in forum: Python
    Replies:
    11
    Views:
    472
    Alberto Berti
    Nov 15, 2007
  4. Damon Getsman
    Replies:
    3
    Views:
    381
    Damon Getsman
    May 21, 2008
  5. Stéphane Klein
    Replies:
    0
    Views:
    267
    Stéphane Klein
    Jul 5, 2011
Loading...

Share This Page