Hi, Thanks for all the comments, I did found a stupid error in my coded: RequestDir=os.path.join(dir,proposalid,runid,'process',id) The dir was not existing. And now it is working. I thought it was a problem with objectValues/ObjectItems/etc. Thanks, Els --------------------------------------------- Dieter Maurer wrote:
Homan Els writes:
Does somebody know why, I am getting an error on this function (inside a zope-product):
def CreateProcessDirs(self,proposalid,runid): for i in self.objectValues(): id=i.id if callable( id ): id = id() RequestDir=os.path.join(dir,proposalid,runid,'process',id)
if os.path.exists(RequestDir): print 'pathname ( file or directory) exist',path else: os.system('mkdir -p '+RequestDir) print "Make Directory: ",RequestDir return i
The error message is:
Error Type: TypeError Error Value: unsliceable object You got a traceback?
It tells you where the TypeError occured. The code, you posted, does not have an obvious slice. Thus, you (or we) need to look at the traceback to narrow the problem down.
Dieter
-- _______________________________________________________________________ Els Homan European Molecular Biology Laboratory (EMBL) 6, rue Jules Horowitz, B.P.181 38042 Grenoble cedex 9. France homan@embl-grenoble.fr (Email) 04 76 20 74 66 (Phone) 04 76 20 71 99 (Fax) ______________________________________________________________________