[python-win32] IActiveScript::AddNamedItem fails with exception

Tim Roberts timr at probo.com
Mon Apr 2 18:51:26 CEST 2012

David Manns wrote:
> We have a scripting engine interface in our application. This works
> fine for loading/calling VBscript and Javascript scripting engines,
> but PythonScript fails. Specifically, it fails at :
>     m_pAxsScript->AddNamedItem("application", SCRIPTITEM_NAMEDITEM)
> where m_pAxsScript is the IActiveScript interface acquired through
> CoCreateInstance. The hresult returned is:
>     80004005
> which to my mind implies some kind of 'access denied' error.

Have you enabled Python as an Active Scripting engine?  It's not enabled
by default, because there are security issues that couldn't be
completely eliminated without disabling parts of the interpreter.  See

Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.

More information about the python-win32 mailing list