There is currently an issue which leads to a crash of the Python Kernel when running CADET on Windows.
After some digging, we found out that the issue comes with one of our dependencies, namely hdf5/h5py.
When HDF5 v1.12.2 was released, h5py seems to not have properly included the new headers. Which leads to the following error:
Warning! ***HDF5 library version mismatched error***
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
You can, at your own risk, disable this warning by setting the environment
variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.
Headers are 1.12.2, library is 1.12.1
We know other projects seem to have the same issue and we contacted the h5py developers.
opened 07:04PM - 04 Jun 22 UTC
In [TorchGeo](https://github.com/microsoft/torchgeo), we use h5py to load sample… HDF5 files in our unit tests. These tests are run on CI for Linux/macOS/Python. Since the new 3.7.0 release, our tests have been failing on Windows (for example, [here](https://github.com/microsoft/torchgeo/runs/6739917905?check_suite_focus=true)). I believe there may be an issue with the h5py 3.7.0 wheels on Windows. I don't have easy access to a Windows machine to test this, but I'm guessing something as simple as importing h5py will fail on Windows, at least with Python 3.10.
* Operating System: Microsoft Windows Server 2022 (10.0.20348)
* Python version: 3.10.4
* Source: setup-python GitHub Action
* h5py version: 3.7.0
* HDF5 version: whatever comes with the 3.7.0 Windows wheels
* The full traceback/stack trace shown:
```
Fatal Python error: Aborted
Current thread 0x000013c4 (most recent call first):
File "<frozen importlib._bootstrap>", line 241 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 1184 in exec_module
File "<frozen importlib._bootstrap>", line 688 in _load_unlocked
File "<frozen importlib._bootstrap>", line 1006 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1027 in _find_and_load
File "<frozen importlib._bootstrap>", line 241 in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1078 in _handle_fromlist
File "C:\Miniconda\envs\test\lib\site-packages\h5py\__init__.py", line 56 in <module>
File "<frozen importlib._bootstrap>", line 241 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 883 in exec_module
File "<frozen importlib._bootstrap>", line 688 in _load_unlocked
File "<frozen importlib._bootstrap>", line 1006 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1027 in _find_and_load
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\outcomes.py", line 288 in importorskip
File "D:\a\torchgeo\torchgeo\tests\datasets\test_so2sat.py", line 18 in <module>
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\assertion\rewrite.py", line 168 in exec_module
File "<frozen importlib._bootstrap>", line 688 in _load_unlocked
File "<frozen importlib._bootstrap>", line 1006 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1027 in _find_and_load
File "<frozen importlib._bootstrap>", line 1050 in _gcd_import
File "C:\Miniconda\envs\test\lib\importlib\__init__.py", line 126 in import_module
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\pathlib.py", line 533 in import_path
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\python.py", line 608 in _importtestmodule
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\python.py", line 519 in _getobj
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\python.py", line 301 in obj
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\python.py", line 536 in _inject_setup_module_fixture
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\python.py", line 522 in collect
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\runner.py", line 369 in <lambda>
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\runner.py", line 338 in from_call
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\runner.py", line 369 in pytest_make_collect_report
File "C:\Miniconda\envs\test\lib\site-packages\pluggy\_callers.py", line 39 in _multicall
File "C:\Miniconda\envs\test\lib\site-packages\pluggy\_manager.py", line 80 in _hookexec
File "C:\Miniconda\envs\test\lib\site-packages\pluggy\_hooks.py", line 265 in __call__
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\runner.py", line 537 in collect_one_node
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\main.py", line 824 in genitems
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\main.py", line 827 in genitems
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\main.py", line 657 in perform_collect
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\main.py", line 332 in pytest_collection
File "C:\Miniconda\envs\test\lib\site-packages\pluggy\_callers.py", line 39 in _multicall
File "C:\Miniconda\envs\test\lib\site-packages\pluggy\_manager.py", line 80 in _hookexec
File "C:\Miniconda\envs\test\lib\site-packages\pluggy\_hooks.py", line 265 in __call__
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\main.py", line 321 in _main
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\main.py", line 268 in wrap_session
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\main.py", line 315 in pytest_cmdline_main
File "C:\Miniconda\envs\test\lib\site-packages\pluggy\_callers.py", line 39 in _multicall
File "C:\Miniconda\envs\test\lib\site-packages\pluggy\_manager.py", line 80 in _hookexec
File "C:\Miniconda\envs\test\lib\site-packages\pluggy\_hooks.py", line 265 in __call__
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\config\__init__.py", line 164 in main
File "C:\Miniconda\envs\test\lib\site-packages\_pytest\config\__init__.py", line 187 in console_main
File "C:\Miniconda\envs\test\Scripts\pytest.exe\__main__.py", line 7 in <module>
File "C:\Miniconda\envs\test\lib\runpy.py", line 86 in _run_code
File "C:\Miniconda\envs\test\lib\runpy.py", line 196 in _run_module_as_main
```
In the meantime, for a quick fix, simply downgrade h5py:
pip uninstall h5py
pip install h5py==3.6.0
We’re also working on a new hotfix release of CADET-Python which will put bounds on the h5py version until the issue is resolved upstream.
Thanks for understanding!