[Zope] import of "aq_base" from "Acquisition" is unauthorized.
You are not allowed to access 'aq_base' in this context
Paul Winkler
pw_lists at slinkp.com
Thu Mar 17 10:12:39 EST 2005
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
More information about the Zope
mailing list