From: Anthony S. <sc...@gm...> - 2012-06-21 17:23:57
|
Hi Daniele, This is probably because of the way PyTables caches its file objects. As a temporary work around, why don't you try clearing the cache or at least removing this file. The cache is just a dictionary and it is located at "tables.file._open_files". ie try: tables.file._open_files.clear() -or- del tables.file._open_files.pop["touch.h5"] Be Well Anthony On Thu, Jun 21, 2012 at 10:43 AM, Mythsmith <sp...@mo...> wrote: > Hi, > I noticed that if I open an erroneous file (eg: empty), then it seems not > possible to completely close it and reopen the same path, even if a valid > file was created in the meanwhile. > The error is: > ValueError: The file 'touch.h5' is already opened. Please close it before > reopening in write mode. > > You find a complete example attached. > > Regards, > daniele > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Pytables-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pytables-users > > |