<HTML><BODY>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: tahoma; BACKGROUND-COLOR: white">
<DIV class=Fixed>
<DIV>Thanks for the answers, indeed the problem "was" outside the code.</DIV>
<DIV> </DIV>
<DIV>Thanks to all the community!!</DIV>
<DIV>and to [Alexis, <FONT color=#000000>Chris, Dieter, -aj(Andreas Jung),
Y. (Yuri)]</FONT></DIV>
<DIV> </DIV>
<DIV>Leticia<BR><BR>-----Original Message-----<BR>From: "SER.RI-TIC-Alexis
Roda" <alexis.roda@urv.net><BR>To: Leticia Larrosa
<LETICIA@tesla.cujae.edu.cu><BR>Date: Thu, 24 Mar 2005 09:49:38
+0100<BR>Subject: Re: [Zope] manage_delObjects()<BR><BR>> Leticia Larrosa
wrote:<BR>> > Thanks for all the answer but I try, for example
whit:<BR>> > <BR>> > folderToDelete = 'toDelete'<BR>> >
container.manage_delObjects([folderToDelete])<BR>> > <BR>> >
#or<BR>> > <BR>> >
container.manage_delObjects([container[folderToDelete].getId()])<BR>>
> <BR>> > and get the following error in both cases:<BR>> >
Error Type: KeyError<BR>> > Error Value: toDelete<BR>> <BR>>
Seems like the object you're trying to delete don't exists (inside <BR>>
container). In order to check this add (just before the <BR>>
container.manage_delObjects()) something like:<BR>> <BR>> raise
'debug', container.objectIds()<BR>> <BR>> or<BR>> <BR>> raise
'debug', container.absolute_url()<BR>> <BR>> just to ensure that
container is really what it should be and<BR>> 'toDelete' <BR>> is a
subitem.<BR>> <BR>> <BR>> HTH<BR>> -- <BR>>
////<BR>>
(@ @)<BR>>
----------------------------oOO----(_)----OOo--------------------------<BR>
> <> Ojo por ojo y
el mundo acabara ciego<BR>> /\ Alexis Roda - Universitat Rovira i Virgili
- Reus, Tarragona (Spain)<BR>>
-----------------------------------------------------------------------<BR>
> <BR>> <BR>> <BR></DIV></DIV></DIV>
</BODY></HTML>