mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
209 stars 122 forks source link

Abins deprecation warning #27972

Closed DanielMurphy22 closed 4 years ago

DanielMurphy22 commented 4 years ago

Found when testing for this issue on the forum

Expected behavior

Abins is used a lot, and we don't want any deprecation warnings

Actual behavior

Get deprecation warning : dataset.value has been deprecated. Use dataset[()] instead.

Steps to reproduce the behavior

run this:

benzene_wrk = Abins(AbInitioProgram="CASTEP", VibrationalOrPhononFile="benzene.phonon",
                    QuantumOrderEventsNumber="1")
for name in benzene_wrk.getNames():
    print(name)

you will need this file on your path benzene.zip

https://discourse.julialang.org/t/dont-understand-what-h5py-people-are-thinking/26387

refs #27863

Platforms affected

Workbench Nightly since Py3 (Seen on 4.2.20200211.2150)

ajjackson commented 4 years ago

Good spot, will sort it. Thanks for links to informative discussion!

ajjackson commented 4 years ago

Have tracked this down. Only appears with recent versions of h5py, I couldn't see the warnings with the ubuntubionic development docker image until that library was updated with Pip.

These warning messages are pretty unhelpful as they don't give their origin, but it seems that they all come from a couple of places in AbinsModules.IOmodule .