hyperion-rt / hyperion

Hyperion Radiative Transfer Code
http://www.hyperion-rt.org
BSD 2-Clause "Simplified" License
52 stars 26 forks source link

h5py2.8 fails #200

Closed dnarayanan closed 6 years ago

dnarayanan commented 6 years ago

Hey @astrofrog -- I think hyperion might not be compatible with h5py2.8:

In [3]: h5py.version.version
Out[3]: '2.8.0'

When running hyperion (within the powderday wrapper):

[pd_front_end]: Beginning RT Stage: Calculating SED using a binned spectrum
Traceback (most recent call last):
  File "pd_front_end.py", line 273, in <module>
    m.write(model.inputfile+'.sed',overwrite=True)
  File "/home/desika.narayanan/miniconda2/lib/python2.7/site-packages/hyperion/model/model.py", line 646, in write
    dust.write(g_dust.create_group(short_name))
  File "/home/desika.narayanan/miniconda2/lib/python2.7/site-packages/hyperion/dust/dust_type.py", line 296, in write
    if isinstance(dt, h5py.highlevel.File):
AttributeError: 'module' object has no attribute 'highlevel'

However, I have success with:

In [2]: h5py.version.version
Out[2]: '2.7.1'
astrofrog commented 6 years ago

@dnarayanan - thanks for the report! Do you have any time to look into a fix? (basically just looking for where the File class has been moved to)

dnarayanan commented 6 years ago

I can! I'm on holiday this week but will do so next week if that's okay.

astrofrog commented 6 years ago

@dnarayanan - it was an easy fix in the end: https://github.com/hyperion-rt/hyperion/pull/201