hi... i'm unable to delete files with a python script (and also with a dtml method) :( i've created a folder "/testfolder" in this folder exists a file "testfile" and the following python script "deleteFile" is also located in the folder: ## Script (Python) "deleteFile" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## request = container.REQUEST RESPONSE = request.RESPONSE context.manage_delObjects( ids=('testfile',) ) when i try the script with "http://blabla.blabla.com/testfolder/deleteFile" i get the following error msg: Error Value: object doesn't support item deletion lg - siegmund -- _ __ (_)________ / /_ __ ______ ________ ____ _________ _ / / ___/ __ \/ __ \/ / / / __ \/ ___/ _ \ / __ \/ ___/ __ `/ / (__ ) /_/ / / / / /_/ / /_/ (__ ) __// /_/ / / / /_/ / /_/____/\____/_/ /_/\__, / .___/____/\___(_)____/_/ \__, / /____/_/ sifu@isohypse.org /____/
On Wed, Mar 13, 2002 at 07:59:23PM +0100, Siegmund Fuhringer wrote:
## Script (Python) "deleteFile" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## request = container.REQUEST RESPONSE = request.RESPONSE context.manage_delObjects( ids=('testfile',) )
the method isn't happy with a tuple :( correct line: context.manage_delObjects( ids=['testfile',] )
when i try the script with "http://blabla.blabla.com/testfolder/deleteFile" i get the following error msg:
Error Value: object doesn't support item deletion
lg - siegmund -- _ __ (_)________ / /_ __ ______ ________ ____ _________ _ / / ___/ __ \/ __ \/ / / / __ \/ ___/ _ \ / __ \/ ___/ __ `/ / (__ ) /_/ / / / / /_/ / /_/ (__ ) __// /_/ / / / /_/ / /_/____/\____/_/ /_/\__, / .___/____/\___(_)____/_/ \__, / /____/_/ sifu@isohypse.org /____/
Siegmund Fuhringer writes:
i'm unable to delete files with a python script (and also with a dtml method) :( ... context.manage_delObjects( ids=('testfile',) )
when i try the script with "http://blabla.blabla.com/testfolder/deleteFile" i get the following error msg:
Error Value: object doesn't support item deletion I expect, "context" is not what you expect.
It must be an Object Manager for "manage_delObjects" to work. Dieter
On Thu, Mar 14, 2002 at 09:04:57PM +0100, Dieter Maurer wrote:
Siegmund Fuhringer writes:
i'm unable to delete files with a python script (and also with a dtml method) :( ... context.manage_delObjects( ids=('testfile',) )
when i try the script with "http://blabla.blabla.com/testfolder/deleteFile" i get the following error msg:
Error Value: object doesn't support item deletion I expect, "context" is not what you expect.
It must be an Object Manager for "manage_delObjects" to work.
thank you! but context was a normal folder, the only problem was, that i used a tuple "('testfile',)" and not a list "['testfile',]" as arg. and i think the method "manage_delObjects" tried to delete an entry from the tuple. lg SiFu;
Dieter
-- _ __ (_)________ / /_ __ ______ ________ ____ _________ _ / / ___/ __ \/ __ \/ / / / __ \/ ___/ _ \ / __ \/ ___/ __ `/ / (__ ) /_/ / / / / /_/ / /_/ (__ ) __// /_/ / / / /_/ / /_/____/\____/_/ /_/\__, / .___/____/\___(_)____/_/ \__, / /____/_/ sifu@isohypse.org /____/
participants (2)
-
Dieter Maurer -
Siegmund Fuhringer