Skip to content

self.read() was being passed 'restart' instead of 'label'

Michael Waters requested to merge mjwaters/ase:patch-4 into master

self.read() was being passed 'restart' (which is a bool) when it expects 'label' (which is a string).

I was getting this error while trying to read an Abinit band structure:

Traceback (most recent call last): File "plot_bs_with_ase.py", line 6, in calc_scf = Abinit(restart = True, label = 'NaAsSe2', directory = 'SCF', prefix='NaAsSe2') File "/home/mjwaters/software/ase/ase/calculators/abinit.py", line 67, in init label, atoms, **kwargs) File "/home/mjwaters/software/ase/ase/calculators/calculator.py", line 900, in init atoms, **kwargs) File "/home/mjwaters/software/ase/ase/calculators/calculator.py", line 501, in init self.read(restart) # read parameters, atoms and results File "/home/mjwaters/software/ase/ase/calculators/abinit.py", line 98, in read FileIOCalculator.read(self, label) File "/home/mjwaters/software/ase/ase/calculators/calculator.py", line 633, in read self.set_label(label) File "/home/mjwaters/software/ase/ase/calculators/calculator.py", line 590, in set_label self.label = label File "/home/mjwaters/software/ase/ase/calculators/calculator.py", line 568, in label tokens = label.rsplit('/', 1) AttributeError: 'bool' object has no attribute 'rsplit'

Cheers!

Merge request reports