Skip to content

Instantly share code, notes, and snippets.

@garrison
Last active August 29, 2015 14:07
Show Gist options
  • Save garrison/c4841e28aefad3a5112c to your computer and use it in GitHub Desktop.
Save garrison/c4841e28aefad3a5112c to your computer and use it in GitHub Desktop.
h5py issue 480 testing
16776885
Traceback (most recent call last):
File "histest.py", line 9, in <module>
dsid.get_type()
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "h5d.pyx", line 307, in h5py.h5d.DatasetID.get_type (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:4144)
RuntimeError: Unable to register datatype (Can't insert duplicate key)
import h5py
i = 0
try:
with h5py.File("test.h5", "w") as f:
sid = h5py.h5s.create(h5py.h5s.SCALAR)
dsid = h5py.h5d.create(f.id, b"test", h5py.h5t.IEEE_F32LE, sid)
while True:
dsid.get_type()
i += 1
finally:
print(i)
52101
Traceback (most recent call last):
File "mytest.py", line 13, in <module>
f["test"][...]
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_hl/dataset.py", line 467, in __getitem__
self.id.read(mspace, fspace, arr, mtype)
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "h5d.pyx", line 175, in h5py.h5d.DatasetID.read (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2995)
File "_proxy.pyx", line 130, in h5py._proxy.dset_rw (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_proxy.c:1722)
File "_proxy.pyx", line 84, in h5py._proxy.H5PY_H5Dread (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_proxy.c:1392)
IOError: Can't read data (Inflate() failed)
import shutil
import tempfile
import h5py
tmpdir = tempfile.mkdtemp()
i = 0
try:
with h5py.File("test.h5", "w") as f:
f.create_dataset("test", data=[[1,2],[3,4]], compression="gzip", shuffle=True)
with h5py.File("test.h5", "r") as f:
while True:
f["test"][...]
i += 1
finally:
shutil.rmtree(tmpdir)
print(i)
51129
Traceback (most recent call last):
File "mytest1.py", line 13, in <module>
f["test"][...]
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_hl/dataset.py", line 467, in __getitem__
self.id.read(mspace, fspace, arr, mtype)
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "h5d.pyx", line 175, in h5py.h5d.DatasetID.read (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2995)
File "_proxy.pyx", line 130, in h5py._proxy.dset_rw (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_proxy.c:1722)
File "_proxy.pyx", line 84, in h5py._proxy.H5PY_H5Dread (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_proxy.c:1392)
IOError: Can't read data (Inflate() failed)
import shutil
import tempfile
import h5py
tmpdir = tempfile.mkdtemp()
i = 0
try:
with h5py.File("test.h5", "w") as f:
f.create_dataset("test", data=[[1,2],[3,4]], compression="gzip")
with h5py.File("test.h5", "r") as f:
while True:
f["test"][...]
i += 1
finally:
shutil.rmtree(tmpdir)
print(i)
4194220
Traceback (most recent call last):
File "mytest1a.py", line 13, in <module>
f["test"][...]
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_hl/dataset.py", line 400, in __getitem__
new_dtype = readtime_dtype(self.id.dtype, names)
File "h5d.pyx", line 114, in h5py.h5d.DatasetID.dtype.__get__ (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2195)
File "h5d.pyx", line 116, in h5py.h5d.DatasetID.dtype.__get__ (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2119)
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "h5d.pyx", line 307, in h5py.h5d.DatasetID.get_type (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:4144)
RuntimeError: Unable to register datatype (Can't insert duplicate key)
import shutil
import tempfile
import h5py
tmpdir = tempfile.mkdtemp()
i = 0
try:
with h5py.File("test.h5", "w") as f:
f.create_dataset("test", data=[[1,2],[3,4]])
with h5py.File("test.h5", "r") as f:
while True:
f["test"][...]
i += 1
finally:
shutil.rmtree(tmpdir)
print(i)
58013
Traceback (most recent call last):
File "mytest2.py", line 12, in <module>
f["test"][...]
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_hl/dataset.py", line 467, in __getitem__
self.id.read(mspace, fspace, arr, mtype)
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "h5d.pyx", line 175, in h5py.h5d.DatasetID.read (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2995)
File "_proxy.pyx", line 130, in h5py._proxy.dset_rw (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_proxy.c:1722)
File "_proxy.pyx", line 84, in h5py._proxy.H5PY_H5Dread (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_proxy.c:1392)
IOError: Can't read data (Inflate() failed)
import shutil
import tempfile
import h5py
tmpdir = tempfile.mkdtemp()
i = 0
try:
with h5py.File("test.h5", "w") as f:
f.create_dataset("test", data=[[1,2],[3,4]], compression="gzip")
while True:
f["test"][...]
i += 1
finally:
shutil.rmtree(tmpdir)
print(i)
4194220
Traceback (most recent call last):
File "mytest2a.py", line 12, in <module>
f["test"][...]
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_hl/dataset.py", line 400, in __getitem__
new_dtype = readtime_dtype(self.id.dtype, names)
File "h5d.pyx", line 114, in h5py.h5d.DatasetID.dtype.__get__ (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2195)
File "h5d.pyx", line 116, in h5py.h5d.DatasetID.dtype.__get__ (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2119)
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "h5d.pyx", line 307, in h5py.h5d.DatasetID.get_type (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:4144)
RuntimeError: Unable to register datatype (Can't insert duplicate key)
import shutil
import tempfile
import h5py
tmpdir = tempfile.mkdtemp()
i = 0
try:
with h5py.File("test.h5", "w") as f:
f.create_dataset("test", data=[[1,2],[3,4]])
while True:
f["test"][...]
i += 1
finally:
shutil.rmtree(tmpdir)
print(i)
8388440
Traceback (most recent call last):
File "mytest3.py", line 12, in <module>
f["test"].dtype
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_hl/dataset.py", line 179, in dtype
return self.id.dtype
File "h5d.pyx", line 114, in h5py.h5d.DatasetID.dtype.__get__ (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2195)
File "h5d.pyx", line 116, in h5py.h5d.DatasetID.dtype.__get__ (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2119)
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "h5d.pyx", line 307, in h5py.h5d.DatasetID.get_type (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:4144)
RuntimeError: Unable to register datatype (Can't insert duplicate key)
import shutil
import tempfile
import h5py
tmpdir = tempfile.mkdtemp()
i = 0
try:
with h5py.File("test.h5", "w") as f:
f.create_dataset("test", data=[[1,2],[3,4]], compression="gzip")
while True:
f["test"].dtype
i += 1
finally:
shutil.rmtree(tmpdir)
print(i)
8388440
Traceback (most recent call last):
File "mytest3a.py", line 12, in <module>
f["test"].dtype
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_hl/dataset.py", line 179, in dtype
return self.id.dtype
File "h5d.pyx", line 114, in h5py.h5d.DatasetID.dtype.__get__ (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2195)
File "h5d.pyx", line 116, in h5py.h5d.DatasetID.dtype.__get__ (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:2119)
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/_objects.c:2461)
File "h5d.pyx", line 307, in h5py.h5d.DatasetID.get_type (/home/garrison/h5py_bug/newtest/testenv2-site/src/h5py/h5py/h5d.c:4144)
RuntimeError: Unable to register datatype (Can't insert duplicate key)
import shutil
import tempfile
import h5py
tmpdir = tempfile.mkdtemp()
i = 0
try:
with h5py.File("test.h5", "w") as f:
f.create_dataset("test", data=[[1,2],[3,4]])
while True:
f["test"].dtype
i += 1
finally:
shutil.rmtree(tmpdir)
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment