h5jvalidate does not run due to missing h5json.schema
t-b opened this issue · 2 comments
t-b commented
$ pip install git+https://github.com/HDFGroup/hdf5-json.git
Collecting git+https://github.com/HDFGroup/hdf5-json.git
Cloning https://github.com/HDFGroup/hdf5-json.git to c:\users\thomas\appdata\local\temp\pip-req-build-dpe2vrri
Running command git clone --filter=blob:none --quiet https://github.com/HDFGroup/hdf5-json.git 'C:\Users\thomas\AppData\Local\Temp\pip-req-build-dpe2vrri'
Resolved https://github.com/HDFGroup/hdf5-json.git to commit 7211678cf8c3217ac7cc9a9df0ab9dc5d68c182d
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.16.6 in c:\users\thomas\anaconda3\lib\site-packages (from h5json==1.2.dev0+13.g7211678) (1.19.3)
Requirement already satisfied: h5py>=3.0 in c:\users\thomas\anaconda3\lib\site-packages (from h5json==1.2.dev0+13.g7211678) (3.3.0)
Requirement already satisfied: jsonschema>=4.4.0 in c:\users\thomas\anaconda3\lib\site-packages (from h5json==1.2.dev0+13.g7211678) (4.16.0)
Requirement already satisfied: importlib-resources>=1.4.0 in c:\users\thomas\anaconda3\lib\site-packages (from jsonschema>=4.4.0->h5json==1.2.dev0+13.g7211678) (5.10.0)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in c:\users\thomas\anaconda3\lib\site-packages (from jsonschema>=4.4.0->h5json==1.2.dev0+13.g7211678) (0.17.3)
Requirement already satisfied: attrs>=17.4.0 in c:\users\thomas\anaconda3\lib\site-packages (from jsonschema>=4.4.0->h5json==1.2.dev0+13.g7211678) (20.3.0)
Requirement already satisfied: pkgutil-resolve-name>=1.3.10 in c:\users\thomas\anaconda3\lib\site-packages (from jsonschema>=4.4.0->h5json==1.2.dev0+13.g7211678) (1.3.10)
Requirement already satisfied: zipp>=3.1.0 in c:\users\thomas\anaconda3\lib\site-packages (from importlib-resources>=1.4.0->jsonschema>=4.4.0->h5json==1.2.dev0+13.g7211678) (3.4.1)
This gives:
$ h5jvalidate.exe test.json
Traceback (most recent call last):
File "C:\users\thomas\Anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\users\thomas\Anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\users\thomas\Anaconda3\Scripts\h5jvalidate.exe\__main__.py", line 7, in <module>
File "C:\users\thomas\Anaconda3\lib\site-packages\h5json\validator\validator.py", line 73, in main
validator = prepare_validator()
File "C:\users\thomas\Anaconda3\lib\site-packages\h5json\validator\validator.py", line 22, in prepare_validator
with importlib.resources.open_text(schema, "hdf5.schema.json") as f:
File "C:\users\thomas\Anaconda3\lib\importlib\resources.py", line 126, in open_text
_check_location(package)
File "C:\users\thomas\Anaconda3\lib\importlib\resources.py", line 82, in _check_location
raise FileNotFoundError(f'Package has no location {package!r}')
FileNotFoundError: Package has no location <module 'h5json.schema' (namespace)>
I could not use the published package as that does not support my HDF5 file due to missing bytes support.
ajelenak commented
I cannot replicate your error:
- Created a new conda environment with Python 3.10.
- Installed h5py and jsonschema packages.
- Installed hdf5-json with the same pip command as you.
h5jvalidate
worked on a sample HDF5/JSON file.
Do you have HDF5/JSON schema files in the $CONDA_PREFIX/lib/python3.10/site-packages/h5json/schema
folder?
ajelenak commented
Closing as inactive.