From 67ce7891958563eee5d6e9eeb4804018166bad53 Mon Sep 17 00:00:00 2001 From: Marnik Bercx Date: Mon, 21 Aug 2023 16:10:59 +0200 Subject: [PATCH] Fix `AbinitTimerParseError` import --- abipy/flowtk/abitimer.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/abipy/flowtk/abitimer.py b/abipy/flowtk/abitimer.py index 3cdf50448..b79d5520b 100644 --- a/abipy/flowtk/abitimer.py +++ b/abipy/flowtk/abitimer.py @@ -1,3 +1,9 @@ # flake8: noqa -#from pymatgen.io.abinit.abitimer import AbinitTimerParserError, AbinitTimerParser, AbinitTimerSection -from pymatgen.io.abinit.abitimer import AbinitTimerParseError, AbinitTimerParser, AbinitTimerSection +from pymatgen.core import __version__ as pmg_version +from pymatgen.io.abinit.abitimer import AbinitTimerParser, AbinitTimerSection + + +if pmg_version < '2023.7.10': + from pymatgen.io.abinit.abitimer import AbinitTimerParserError as AbinitTimerParseError +else: + from pymatgen.io.abinit.abitimer import AbinitTimerParseError