PonyDeluxe / alembic

Automatically exported from code.google.com/p/alembic
Other
0 stars 0 forks source link

[ PyAlembic - cask.py ] Archive is locked after reading. #318

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
import cask
path = 'xxx.abc'
iarch = cask.Archive(path)
print iarch.top.children.keys()
iarch.close()

2. Try rename xxx.abc or AbcExport to this file name.

What version of the product are you using? On what operating system?
PyAlembic v1.5.1, Maya 2012, Windows 7

Original issue reported on code.google.com by samw...@gmail.com on 4 Oct 2013 at 1:55

GoogleCodeExporter commented 8 years ago
A temporary workaround while this is fixed in cask is to use the python 
bindings directly:

path = '/var/tmp/cube.abc'
import alembic
a = alembic.Abc.IArchive(path)
print a.getTop().getName()
del a

When a is deleted the archive is appropriately closed.

Original comment by miller.lucas on 4 Oct 2013 at 5:00

GoogleCodeExporter commented 8 years ago

Original comment by miller.lucas on 8 Oct 2013 at 6:36

GoogleCodeExporter commented 8 years ago
It seems like something in cask may be keeping a handle on the file, and HDF 
does a check before writing:

HDF5-DIAG: Error detected in HDF5 (1.8.9) thread 140355199285344:
  #000: ../../hdf5-1.8.9/src/H5F.c line 1452 in H5Fcreate(): unable to create file
    major: File accessability
    minor: Unable to open file
  #001: ../../hdf5-1.8.9/src/H5F.c line 1255 in H5F_open(): unable to truncate a file which is already open
    major: File accessability
    minor: Unable to open file

I'll look into a fix in cask, but in the meantime you can try exporting to 
Ogawa, if that's an option for you, which does not exhibit this problem.

Original comment by r...@rsgalloway.com on 9 Oct 2013 at 5:18

GoogleCodeExporter commented 8 years ago
This was fixed in Alembic 1.5.3

Original comment by miller.lucas on 19 Dec 2013 at 6:03