Zope import PythonScript.standard unauthorized

L

Lucas Branca

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
 
E

Evan Simpson

Lucas said:
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
 
L

Lucas Branca

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


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
 
L

Lucas Branca

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
 
E

Evan Simpson

Lucas said:
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
 
L

Lucas Branca

Evan Simpson said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top