[Zope] add LocalFS in python
Jens Dobberthin
jensd at media-meter.de
Mon Nov 24 12:06:27 EST 2003
Salut,
I had some trouble using manage_addLocalFS() within Python code, and I
think I've got a similiar error message like you. The following patch
made it working for me:
294c294,296
< class ObjectWrapper(Wrapper, c): pass
---
> class ObjectWrapper(Wrapper, c):
> """ObjectWraper class."""
> pass
1353c1355,1356
< return self.manage_main(self, REQUEST)
---
> if REQUEST is not None:
> return self.manage_main(self, REQUEST)
The second change is essientiell!
Hope that helps...
Jens.
Am Don, 2003-10-16 um 18.10 schrieb Michael:
> Hi,
>
> 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')
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 98, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 39, in call_object
> Module Shared.DC.Scripts.Bindings, line 252, in __call__
> Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
> Module Products.PythonScripts.PythonScript, line 315, in _exec
> 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
>
> Regards,
>
> Michael
More information about the Zope
mailing list