Skip to content

Is OSError an incompatibility between loompy and h5py, or does it require a specific version of loompy? #192

@Li-shiyue

Description

@Li-shiyue

Recently, I've been getting an error when generating the final loom file when running velocyto. I've checked memory and write permissions, and they're all correct. Some samples can be generated successfully, and some can be generated after repeated runs, but some get stuck with the following error. I've looked for solutions, but haven't been able to resolve the issue. If it's a version issue, should I modify loompy or h5py?

Traceback (most recent call last):
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/velocyto/commands/_run.py", line 286, in _run
ds = loompy.create(filename=outfile, matrix=total, row_attrs=ra, col_attrs=ca, dtype="float32")
TypeError: create() got an unexpected keyword argument 'matrix'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/loompy/loompy.py", line 1082, in create
ds.layer[key] = vals
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/loompy/layer_manager.py", line 90, in setitem
return self.setattr(name, val)
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/loompy/layer_manager.py", line 131, in setattr
self.ds._file.create_dataset(
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/h5py/_hl/group.py", line 186, in create_dataset
dsid = dataset.make_new_dset(group, shape, dtype, data, name, **kwds)
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/h5py/_hl/dataset.py", line 178, in make_new_dset
dset_id.write(h5s.ALL, h5s.ALL, data)
File "h5py/_objects.pyx", line 56, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 57, in h5py._objects.with_phil.wrapper
File "h5py/h5d.pyx", line 307, in h5py.h5d.DatasetID.write
File "h5py/_proxy.pyx", line 121, in h5py._proxy.dset_rw
OSError: [Errno 5] Can't synchronously write data (file write failed: time = Sat Sep 6 00:01:28 2025
, filename = '/data/age_data/CYJ_1Y/velocyto/CYJ_1Y.loom', file descriptor = 5, errno = 5, error message = 'Input/output error', buf = 0x51ef4e7, total write size = 2217, bytes this sub-write = 2217, offset = 68599808)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/anaconda3/envs/ev/bin/velocyto", line 7, in
sys.exit(cli())
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/click/core.py", line 1442, in call
return self.main(*args, **kwargs)
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/velocyto/commands/run10x.py", line 112, in run10x
return _run(bamfile=(bamfile, ), gtffile=gtffile, bcfile=bcfile, outputfolder=outputfolder,
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/velocyto/commands/_run.py", line 297, in _run
loompy.create(filename=outfile, layers=tmp_layers, row_attrs=ra, col_attrs=ca, file_attrs={"velocyto.version": vcy.version, "velocyto.logic": logic})
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/loompy/loompy.py", line 1093, in create
raise ve
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/loompy/loompy.py", line 1077, in create
with new(filename, file_attrs=file_attrs) as ds:
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/loompy/loompy.py", line 185, in exit
self.close(True)
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/loompy/loompy.py", line 258, in close
self._file.close()
File "/root/anaconda3/envs/ev/lib/python3.10/site-packages/h5py/_hl/files.py", line 629, in close
self.id._close_open_objects(h5f.OBJ_LOCAL | ~h5f.OBJ_FILE)
File "h5py/_objects.pyx", line 56, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 57, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 355, in h5py.h5f.FileID._close_open_objects
ValueError: Unable to insert key (file write failed: time = Sat Sep 6 00:01:28 2025
, filename = '/data/age_data/CYJ_1Y/velocyto/CYJ_1Y.loom', file descriptor = 5, errno = 5, error message = 'Input/output error', buf = 0x51ef4e7, total write size = 2217, bytes this sub-write = 2217, offset = 68599808)
[1] 372463 segmentation fault (core dumped) velocyto run10x /data/age_data/CYJ_1Y

_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
aom 3.6.0 h6a678d5_0
blas 1.0 mkl
brotli-python 1.0.9 py310h6a678d5_9
bzip2 1.0.8 h5eee18b_6
c-ares 1.34.5 hef5626c_0
ca-certificates 2025.7.15 h06a4308_0
cairo 1.18.4 h44eff21_0
click 8.2.1 py310h06a4308_0
contourpy 1.3.1 py310hdb19cb5_0
cycler 0.11.0 pyhd3eb1b0_0
cyrus-sasl 2.1.28 h1110e0f_3
cython 3.1.3 py310hb25bd0a_0
dav1d 1.2.1 h5eee18b_0
dbus 1.16.2 h5bd4931_0
expat 2.7.1 h6a678d5_0
fontconfig 2.14.1 h55d465d_3
fonttools 4.55.3 py310h5eee18b_0
freetype 2.13.3 h4a9f257_0
fribidi 1.0.10 h7b6447c_0
glib 2.84.2 h6a678d5_0
glib-tools 2.84.2 h6a678d5_0
graphite2 1.3.14 h295c915_1
gst-plugins-base 1.14.1 h6a678d5_1
gstreamer 1.14.1 h5eee18b_1
h5py 3.14.0 py310he0d80d8_0
harfbuzz 10.2.0 hdfddeaa_1
hdf5 1.14.5 h2b7332f_2
icu 73.1 h6a678d5_0
intel-openmp 2023.1.0 hdb19cb5_46306
joblib 1.5.1 py310h06a4308_0
jpeg 9e h5eee18b_3
kiwisolver 1.4.8 py310h6a678d5_0
krb5 1.20.1 h143b758_1
lcms2 2.16 h92b89f2_1
ld_impl_linux-64 2.40 h12ee557_0
lerc 4.0.0 h6a678d5_0
libabseil 20250127.0 cxx17_h6a678d5_0
libavif 1.1.1 h5eee18b_0
libclang 14.0.6 default_hc6dbbc7_2
libclang13 14.0.6 default_he11475f_2
libcups 2.4.2 h252cb56_2
libcurl 8.15.0 hc1efc7f_0
libdeflate 1.22 h5eee18b_0
libedit 3.1.20230828 h5eee18b_0
libev 4.33 h7f8727e_1
libevent 2.1.12 hdbd6064_1
libffi 3.4.4 h6a678d5_1
libgcc-ng 11.2.0 h1234567_1
libgfortran-ng 11.2.0 h00389a5_1
libgfortran5 11.2.0 h1234567_1
libglib 2.84.2 h37c7471_0
libgomp 11.2.0 h1234567_1
libiconv 1.16 h5eee18b_3
libkrb5 1.21.3 h520c7b4_4
libllvm14 14.0.6 hecde1de_4
libnghttp2 1.57.0 h2d74bed_0
libpng 1.6.39 h5eee18b_0
libpq 17.4 h02b6914_2
libprotobuf 5.29.3 h3cdef7c_1
libsodium 1.0.18 h7b6447c_0
libssh2 1.11.1 h251f7ec_0
libstdcxx-ng 11.2.0 h1234567_1
libtiff 4.7.0 hde9077f_0
libuuid 1.41.5 h5eee18b_0
libwebp-base 1.3.2 h5eee18b_1
libxcb 1.17.0 h9b100fa_0
libxkbcommon 1.9.1 h69220b7_0
libxml2 2.13.8 hfdd30dd_0
llvmlite 0.44.0 py310hc1e8f15_1
lmdb 0.9.31 hb25bd0a_0
loompy 3.0.8 pypi_0 pypi
lz4-c 1.9.4 h6a678d5_1
matplotlib 3.10.5 py310h06a4308_0
matplotlib-base 3.10.5 py310h9489213_0
mkl 2023.1.0 h213fc3f_46344
mkl-service 2.4.0 py310h5eee18b_2
mkl_fft 1.3.11 py310h5eee18b_0
mkl_random 1.2.8 py310h1128e8f_0
mpi 1.0 mpich
mpi4py 4.0.3 py310hb6b6513_0
mpich 4.1.1 hbae89fd_0
mysql 8.4.0 h721767e_2
ncurses 6.5 h7934f7d_0
numba 0.61.2 py310h6a678d5_0
numpy 1.26.4 py310h5f9d8c6_0
numpy-base 1.26.4 py310hb5e798b_0
numpy-groupies 0.11.3 pypi_0 pypi
openjpeg 2.5.2 h0d4d230_1
openldap 2.6.10 h8e75217_0
openssl 3.0.17 h5eee18b_0
packaging 25.0 py310h06a4308_0
pandas 2.3.2 pypi_0 pypi
pcre2 10.42 hebb0a14_1
pillow 11.3.0 py310hb1c3d2d_0
pip 25.2 pyhc872135_0
pixman 0.46.4 h7934f7d_0
ply 3.11 py310h06a4308_0
pthread-stubs 0.3 h0ce48e5_1
pyparsing 3.2.0 py310h06a4308_0
pyqt 5.15.10 py310h6a678d5_1
pyqt5-sip 12.13.0 py310h5eee18b_1
pysam 0.23.3 pypi_0 pypi
python 3.10.18 h1a3bd86_0
python-dateutil 2.9.0post0 py310h06a4308_2
pytz 2025.2 pypi_0 pypi
qt-main 5.15.2 hb6262e9_12
readline 8.3 hc2a1206_0
scikit-learn 1.7.1 py310hc74f9fe_0
scipy 1.15.3 py310h525edd1_0
setuptools 78.1.1 py310h06a4308_0
sip 6.7.12 py310h6a678d5_1
six 1.17.0 py310h06a4308_0
sqlite 3.50.2 hb25bd0a_1
tbb 2021.8.0 hdb19cb5_0
threadpoolctl 3.5.0 py310h2f386ee_0
tk 8.6.15 h54e0aa7_0
tomli 2.2.1 py310h06a4308_0
tornado 6.5.1 py310h5eee18b_0
tzdata 2025.2 pypi_0 pypi
unicodedata2 15.1.0 py310h5eee18b_1
velocyto 0.17.17 pypi_0 pypi
wheel 0.45.1 py310h06a4308_0
xkeyboard-config 2.44 h5eee18b_0
xorg-libx11 1.8.12 h9b100fa_1
xorg-libxau 1.0.12 h9b100fa_0
xorg-libxdmcp 1.1.5 h9b100fa_0
xorg-libxext 1.3.6 h9b100fa_0
xorg-libxrender 0.9.12 h9b100fa_0
xorg-xorgproto 2024.1 h5eee18b_1
xz 5.6.4 h5eee18b_1
zlib 1.2.13 h5eee18b_1
zstd 1.5.6 hc292b87_0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions