NetCDF HDF error

Post here any question you encounter when running the scripts of the yambo-py suite. Post here problem strictly to the python interface as problem coming from the yambo runs should go in the appropriate subforum.

Moderators: palful, amolina, mbonacci

Post Reply
Dhanjit
Posts: 53
Joined: Sun Jun 12, 2022 4:18 am
Location: Guwahati, Assam, India

NetCDF HDF error

Post by Dhanjit » Thu Apr 23, 2026 10:11 am

Dear developers,
I am new to yambopy and am currently following the official tutorial using the hBN example provided on the yambopy website.
I encountered the following error while following the tutorial:
“Lattice intro: plot k-point coordinates in IBZ/BZ”

Code: Select all

Traceback (most recent call last):
  File "/lustre/hpc/cluster_user/biswajit/dhanjit/databases_yambopy/bz_plot.py", line 28, in <module>
    ylat = YamboLatticeDB.from_db_file(filename='/lustre/hpc/cluster_user/biswajit/dhanjit/databases_yambopy/BSE_saves/YAMBO_saves/SAVE/ns.db1')
  File "/lustre/hpc/software/anaconda3/envs/yambo/lib/python3.14/site-packages/yambopy/dbs/latticedb.py", line 44, in from_db_file
    with Dataset(filename) as database:
         ~~~~~~~^^^^^^^^^^
  File "src/netCDF4/_netCDF4.pyx", line 2517, in netCDF4._netCDF4.Dataset.__init__
  File "src/netCDF4/_netCDF4.pyx", line 2154, in netCDF4._netCDF4._ensure_nc_success
OSError: [Errno -101] NetCDF: HDF error: '/lustre/hpc/cluster_user/biswajit/dhanjit/databases_yambopy/BSE_saves/YAMBO_saves/SAVE/ns.db1'
Initially, I suspected a mismatch between the NetCDF/HDF versions used to generate the database and those in my environment. To address this, I regenerated the SAVE database locally using:
Yambo version: 5.3
netCDF: 4.6
HDF5: parallel (OpenMPI)

However, even with the newly generated database, the same error persists
yambopy version: 0.4.6
Python version: 3.14 (Anaconda environment)
Dr. Dhanjit Talukdar
Institutional Post-Doctoral Fellow,
Materials and Energy Laboratory,
Physical Sciences Division,
Institute of Advanced Study in Science and Technology,
Guwahati, Assam, India

https://iasst.gov.in/

User avatar
palful
Posts: 107
Joined: Tue Jan 26, 2016 11:23 am
Location: Modena and Milan

Re: NetCDF HDF error

Post by palful » Thu Apr 23, 2026 10:54 pm

Dear Dhanjit,

Can I ask you to try with the most recent yambopy version (v0.7.1)? Thank you!

Let me know if the problem persists.

Best,
Fulvio
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy

Post Reply