Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: OSError: [Errno 5] Unable to synchronously open file #1790

Closed
3 tasks done
nwatters01 opened this issue Nov 20, 2023 · 2 comments
Closed
3 tasks done

[Bug]: OSError: [Errno 5] Unable to synchronously open file #1790

nwatters01 opened this issue Nov 20, 2023 · 2 comments

Comments

@nwatters01
Copy link

What happened?

I tried validating an .nwb file with and ran into an error in h5py (see below).

Steps to Reproduce

python -m pynwb.validate ses-2022-05-31_processed.nwb

Traceback

Traceback (most recent call last):
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/pynwb/validate.py", line 238, in <module>
    validate_cli()
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/pynwb/validate.py", line 227, in validate_cli
    validation_errors, validation_status = validate(
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/hdmf/utils.py", line 668, in func_call
    return func(**pargs)
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/pynwb/validate.py", line 143, in validate
    cached_namespaces, manager, namespace_dependencies = _get_cached_namespaces_to_validate(
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/pynwb/validate.py", line 61, in _get_cached_namespaces_to_validate
    namespace_dependencies = NWBHDF5IO.load_namespaces(namespace_catalog=catalog, path=path, driver=driver)
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/hdmf/utils.py", line 664, in func_call
    return func(args[0], **pargs)
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/hdmf/backends/hdf5/h5tools.py", line 169, in load_namespaces
    open_file_obj = cls.__resolve_file_obj(path, file_obj, driver)
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/hdmf/backends/hdf5/h5tools.py", line 144, in __resolve_file_obj
    file_obj = File(path, 'r', **file_kwargs)
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/h5py/_hl/files.py", line 562, in __init__
    fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
  File "/om/user/nwatters/venvs/catalystneuro/lib/python3.10/site-packages/h5py/_hl/files.py", line 235, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5f.pyx", line 102, in h5py.h5f.open
OSError: [Errno 5] Unable to synchronously open file (unable to lock file, errno = 5, error message = 'Input/output error')

Operating System

Linux

Python Executable

Conda

Python Version

3.10

Package Versions

aiobotocore==2.7.0
aiohttp==3.8.6
aioitertools==0.11.0
aiosignal==1.3.1
appdirs==1.4.4
arrow==1.3.0
asciitree==0.3.3
asttokens==2.4.1
async-timeout==4.0.3
attrs==23.1.0
backcall==0.2.0
bidsschematools==0.7.2
blessed==1.20.0
boto3==1.28.64
botocore==1.31.64
bqplot==0.12.42
certifi==2023.7.22
cffi==1.16.0
cfgv==3.4.0
charset-normalizer==3.3.1
ci-info==0.3.0
click==8.1.7
click-didyoumean==0.3.0
comm==0.1.4
contourpy==1.1.1
cryptography==41.0.5
cycler==0.12.1
dandi==0.56.2
dandischema==0.8.4
decorator==5.1.1
dill==0.3.7
distlib==0.3.7
dnspython==2.4.2
email-validator==2.1.0.post1
etelemetry==0.3.1
exceptiongroup==1.1.3
executing==2.0.0
fasteners==0.19
filelock==3.12.4
fonttools==4.43.1
fparse==1.20.1
fqdn==1.5.1
frozenlist==1.4.0
fscacher==0.4.0
fsspec==2023.10.0
gast==0.4.0
h5py==3.10.0
hdmf==3.10.0
humanize==4.8.0
identify==2.5.30
idna==3.4
imageio==2.31.6
importlib-metadata==4.13.0
interleave==0.2.1
ipydatagrid==1.2.0
ipydatawidgets==4.3.2
ipyfilechooser==0.6.0
ipympl==0.9.3
ipython==8.16.1
ipython-genutils==0.2.0
ipyvolume==0.6.3
ipyvue==1.10.1
ipyvuetify==1.8.10
ipywebrtc==0.6.0
ipywidgets==8.1.1
isodate==0.6.1
isoduration==20.11.0
jaraco.classes==3.3.0
-e git+https://github.com/catalystneuro/jazayeri-lab-to-nwb@a72dd8cf14cfea8e2e9f8fff837ae56970c6e471#egg=jazayeri_lab_to_nwb
jedi==0.19.1
jeepney==0.8.0
jmespath==1.0.1
joblib==1.3.2
jsonpointer==2.4
jsonschema==4.19.1
jsonschema-specifications==2023.7.1
jupyterlab-widgets==3.0.9
keyring==24.2.0
keyrings.alt==5.0.0
kiwisolver==1.4.5
lazy-ops==0.2.0
lazy_loader==0.3
lxml==4.9.3
matplotlib==3.8.0
matplotlib-inline==0.1.6
more-itertools==10.1.0
multidict==6.0.4
natsort==8.4.0
ndx-grayscalevolume==0.0.2
ndx-icephys-meta==0.1.0
ndx-spectrum==0.2.2
neo==0.12.0
networkx==3.2
neuroconv==0.4.4
nodeenv==1.8.0
numcodecs==0.12.1
numpy==1.26.1
nwb-conversion-tools==0.11.1
nwbinspector==0.4.30
nwbwidgets==0.11.3
packaging==23.2
pandas==2.1.1
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==10.0.1
platformdirs==3.11.0
plotly==5.13.1
pre-commit==3.5.0
probeinterface==0.2.17
prompt-toolkit==3.0.39
psutil==5.9.6
ptyprocess==0.7.0
pure-eval==0.2.2
py2vega==0.6.1
pycparser==2.21
pycryptodomex==3.19.0
pydantic==1.10.13
Pygments==2.16.1
pynwb==2.5.0
pyout==0.7.3
pyparsing==3.1.1
python-dateutil==2.8.2
pythreejs==2.4.2
pytz==2023.3.post1
PyYAML==6.0.1
quantities==0.14.1
referencing==0.30.2
requests==2.31.0
rfc3339-validator==0.1.4
rfc3987==1.3.8
roiextractors @ git+https://github.com/catalystneuro/roiextractors.git@8db5f9cb3a7ee5efee49b7fd0b694c7a8105519a
rpds-py==0.10.6
ruamel.yaml==0.18.2
ruamel.yaml.clib==0.2.8
s3fs==2023.10.0
s3transfer==0.7.0
scikit-image==0.22.0
scipy==1.11.3
SecretStorage==3.3.3
semantic-version==2.10.0
six==1.16.0
spikeextractors==0.9.11
spikeinterface==0.98.2
stack-data==0.6.3
tenacity==8.2.3
threadpoolctl==3.2.0
tifffile==2023.9.26
tqdm==4.66.1
traitlets==5.12.0
traittypes==0.2.1
trimesh==4.0.1
types-python-dateutil==2.8.19.14
typing_extensions==4.8.0
tzdata==2023.3
uri-template==1.3.0
urllib3==2.0.7
virtualenv==20.24.6
wcwidth==0.2.8
webcolors==1.13
widgetsnbextension==4.0.9
wrapt==1.15.0
yarl==1.9.2
zarr==2.16.1
zarr-checksum==0.2.9
zipp==3.17.0

Code of Conduct

@rly
Copy link
Contributor

rly commented Nov 20, 2023

Can you check that you have permissions to read the file? For example, use head ses-2022-05-31_processed.nwb to try reading part of the file.

Also what kind of file system is the file stored in?
Depending on the file system, running export HDF5_USE_FILE_LOCKING="FALSE"
before the validate command may be helpful.

@nwatters01
Copy link
Author

Oh, the export HDF5_USE_FILE_LOCKING="FALSE" command worked! Everything is good now, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants