Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Zope import PythonScript.standard unauthorized

Reply
Thread Tools

Zope import PythonScript.standard unauthorized

 
 
Lucas Branca
Guest
Posts: n/a
 
      12-11-2003
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


 
Reply With Quote
 
 
 
 
Evan Simpson
Guest
Posts: n/a
 
      12-11-2003
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



 
Reply With Quote
 
 
 
 
Lucas Branca
Guest
Posts: n/a
 
      12-11-2003
> 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


 
Reply With Quote
 
Lucas Branca
Guest
Posts: n/a
 
      12-12-2003
> 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/...linux2-x86.tgz
Finally, all works fine .....

Lucas




 
Reply With Quote
 
Evan Simpson
Guest
Posts: n/a
 
      12-12-2003
Lucas Branca wrote:
> now I removed debian zope package ( sigh sigh ) ,
> and I 'm using
> http://zope.org/Products/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



 
Reply With Quote
 
Lucas Branca
Guest
Posts: n/a
 
      12-13-2003

"Evan Simpson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> > now I removed debian zope package ( sigh sigh ) ,
> > and I 'm using
> > http://zope.org/Products/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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
import problem in zope jack139 Python 0 12-06-2007 01:31 AM
Zope, Python 2.4 pythonScripts import problem krzychu@bmpg.pl Python 3 08-17-2005 11:26 AM
Zope - how to import whole folder at once? Lukasz Indyk Python 2 04-07-2004 11:54 PM
When I installed Silva-0.9.3 and restart Zope, I found ImportError like this - cannot import name ExpatError - jang, seungwook Python 1 01-15-2004 11:16 AM
Re: [Zope-dev] Zope 2.7 running with Stackless 3.0 Shane Hathaway Python 2 08-29-2003 09:59 AM



Advertisments