title: OSError: Unable to open file (file signature not found) / End of HDF5 error back trace
body: <p>I have a small (&lt; 6Mb) <code>.hdf</code> file (obtained from the <a href="https://ladsweb.modaps.eosdis.nasa.gov/" rel="nofollow noreferrer">LAADS DAAC</a> service). I have tried <code>pandas</code> and <code>h5py</code> to open it, to no avail (code shown below). I also tested the file with:</p>
  
  <pre><code>$ h5dump -n data.hdf
  h5dump error: unable to open file "data.hdf"
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$ h5debug data.hdf  
  cannot open file
  </code></pre>
  
  <p>This would all seem to point to a corrupt file, but the weird thing is that <a href="https://www.hdfgroup.org/downloads/hdfview/" rel="nofollow noreferrer">HDF View</a> (v2.11) has <strong>absolutely no issues opening the same file</strong>.</p>
  
  <p>What is going on here?</p>
  
  <hr>
  
  <p><strong>1.</strong></p>
  
  <pre><code>import h5py
  data = h5py.File(filename, 'r')
  
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/h5py/_hl/files.py", line 394, in __init__
      swmr=swmr)
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/h5py/_hl/files.py", line 170, 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 85, in h5py.h5f.open
  OSError: Unable to open file (file signature not found)
  </code></pre>
  
  <p><strong>2.</strong></p>
  
  <pre><code>import pandas as pd
  data = pd.io.pytables.read_hdf(filename)
  
  Traceback (most recent call last):
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/pandas/io/pytables.py", line 603, in open
      self._handle = tables.open_file(self._path, self._mode, **kwargs)
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/tables/file.py", line 320, in open_file
      return File(filename, mode, title, root_uep, filters, **kwargs)
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/tables/file.py", line 784, in __init__
      self._g_new(filename, mode, **params)
    File "tables/hdf5extension.pyx", line 492, in tables.hdf5extension.File._g_new
  tables.exceptions.HDF5ExtError: HDF5 error back trace
  
    File "H5F.c", line 511, in H5Fopen
      unable to open file
    File "H5Fint.c", line 1604, in H5F_open
      unable to read superblock
    File "H5Fsuper.c", line 413, in H5F__super_read
      file signature not found
  
  End of HDF5 error back trace
  
  Unable to open/create file 'data.hdf'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/pandas/io/pytables.py", line 368, in read_hdf
      store = HDFStore(path_or_buf, mode=mode, **kwargs)
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/pandas/io/pytables.py", line 488, in __init__
      self.open(mode=mode, **kwargs)
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/pandas/io/pytables.py", line 636, in open
      raise IOError(str(e))
  OSError: HDF5 error back trace
  
    File "H5F.c", line 511, in H5Fopen
      unable to open file
    File "H5Fint.c", line 1604, in H5F_open
      unable to read superblock
    File "H5Fsuper.c", line 413, in H5F__super_read
      file signature not found
  
  End of HDF5 error back trace
  
  Unable to open/create file 'data.hdf'
  </code></pre>
  
  <p><strong>3.</strong></p>
  
  <pre><code>import pandas as pd
  data = pd.HDFStore(filename, mode='r')
  
  Traceback (most recent call last):
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/pandas/io/pytables.py", line 603, in open
      self._handle = tables.open_file(self._path, self._mode, **kwargs)
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/tables/file.py", line 320, in open_file
      return File(filename, mode, title, root_uep, filters, **kwargs)
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/tables/file.py", line 784, in __init__
      self._g_new(filename, mode, **params)
    File "tables/hdf5extension.pyx", line 492, in tables.hdf5extension.File._g_new
  tables.exceptions.HDF5ExtError: HDF5 error back trace
  
    File "H5F.c", line 511, in H5Fopen
      unable to open file
    File "H5Fint.c", line 1604, in H5F_open
      unable to read superblock
    File "H5Fsuper.c", line 413, in H5F__super_read
      file signature not found
  
  End of HDF5 error back trace
  
  Unable to open/create file 'data.hdf'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/pandas/io/pytables.py", line 488, in __init__
      self.open(mode=mode, **kwargs)
    File "/home/gabriel/miniconda3/envs/py3/lib/python3.7/site-packages/pandas/io/pytables.py", line 636, in open
      raise IOError(str(e))
  OSError: HDF5 error back trace
  
    File "H5F.c", line 511, in H5Fopen
      unable to open file
    File "H5Fint.c", line 1604, in H5F_open
      unable to read superblock
    File "H5Fsuper.c", line 413, in H5F__super_read
      file signature not found
  
  End of HDF5 error back trace
  
  Unable to open/create file 'data.hdf'
  </code></pre>