[Zope] add local filesystem directory with python
Dieter Maurer
dieter at handshake.de
Sun Oct 19 02:24:20 EDT 2003
Michael Bleijerveld wrote at 2003-10-13 13:25 +0200:
> When I try the following python script the message 'TypeError:
> unsubscriptable object' appears.
>
> Python script
>
> container.manage_addProduct['LocalFS'].manage_addLocalFS('test','test','c:\t
> emp\test3')
>
> ....
> Module Script (Python), line 1, in createLocal
> - <PythonScript at /Smartstorage/createLocal>
> - Line 1
> Module Products.LocalFS.LocalFS, line 1255, in manage_addLocalFS
> Module App.FactoryDispatcher, line 103, in manage_main
> TypeError: unsubscriptable object
The traceback shows you:
You are calling "manage_addLocalFS".
It calls "manage_main" from "App.FactoryDispatcher:103".
There, you get a "TypeError" exception.
I remember (--> mailing list archive) that this is a bug in
"manage_addLocalFS". It passes the optional argument "REQUEST"
(initialized as "None") to "manage_main" which requires that it is
a (fairly) true request object.
Pass "REQUEST" explicitely.
Dieter
More information about the Zope
mailing list