import of "aq_base" from "Acquisition" is unauthorized. You are not allowed to access 'aq_base' in this context
I've add "from Acquisition import aq_base" in python script in "portal_skins/custom/" When I test a page, I've this error : import of "aq_base" from "Acquisition" is unauthorized. You are not allowed to access 'aq_base' in this context Why this ? How to resolve it ? I search information about it in Zope Api and Google, I found nothing :( Thanks for your help, Stéphane
On Thu, Mar 17, 2005 at 12:55:51PM +0100, KLEIN St?phane wrote:
I've add "from Acquisition import aq_base" in python script in "portal_skins/custom/"
When I test a page, I've this error :
import of "aq_base" from "Acquisition" is unauthorized. You are not allowed to access 'aq_base' in this context
Why this ? How to resolve it ?
I search information about it in Zope Api and Google, I found nothing :(
This is such a frequently asked question, I'm really surprised you found nothing. For one thing, it's all over the archives of this mailing list. For another, in the Zope Book I know it's explained in the Advanced Scripting chapter. http://www.plope.com/Books/2_7Edition/ScriptingZope.stx#1-7 (This is also in the version on Zope.org, but it lacks named anchors so I can't give you a link right to the section.) To allow arbitrary imports, see: lib/python/Products/PythonScripts/README.txt ... in you zope software home. -- Paul Winkler http://www.slinkp.com
Paul Winkler a écrit :
On Thu, Mar 17, 2005 at 12:55:51PM +0100, KLEIN St?phane wrote:
I've add "from Acquisition import aq_base" in python script in "portal_skins/custom/"
When I test a page, I've this error :
import of "aq_base" from "Acquisition" is unauthorized. You are not allowed to access 'aq_base' in this context
Why this ? How to resolve it ?
I search information about it in Zope Api and Google, I found nothing :(
This is such a frequently asked question, I'm really surprised you found nothing. For one thing, it's all over the archives of this mailing list. For another, in the Zope Book I know it's explained in the Advanced Scripting chapter. http://www.plope.com/Books/2_7Edition/ScriptingZope.stx#1-7 (This is also in the version on Zope.org, but it lacks named anchors so I can't give you a link right to the section.)
To allow arbitrary imports, see: lib/python/Products/PythonScripts/README.txt ... in you zope software home.
Thanks for all informations. Stéphane
KLEIN Stéphane wrote:
I've add "from Acquisition import aq_base" in python script in "portal_skins/custom/"
When I test a page, I've this error :
import of "aq_base" from "Acquisition" is unauthorized. You are not allowed to access 'aq_base' in this context
Why this ? How to resolve it ?
I search information about it in Zope Api and Google, I found nothing :(
Thanks for your help, Stéphane
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
use aq_explicit insted of aq_base. This is allowed within python script wheras aq_base is not. Robert
participants (3)
-
KLEIN Stéphane -
Paul Winkler -
robert