diff --git a/ess/TraceWin.py b/ess/TraceWin.py index f8b7a9ae5528db08f3d8ece1e9529aa6fcb3fa6c..3f8f7e5d9bb84b844d1718fc6304761a7b94394a 100644 --- a/ess/TraceWin.py +++ b/ess/TraceWin.py @@ -725,7 +725,7 @@ class density_file: year = numpy.fromfile(self.fin, dtype=numpy.int16, count=1)[0] if shift: print(year, version) - raise ValueError("ERROR, shifted " + str(shift * 2) + " bytes") + raise ValueError(f"ERROR, shifted {shift + 2} bytes") self.vlong = numpy.fromfile(self.fin, dtype=numpy.int16, count=1)[0] self.Nrun = numpy.fromfile(self.fin, dtype=numpy.int32, count=1)[0] @@ -762,7 +762,7 @@ class density_file: else: raise TypeError(f"It is not possible to read {self.filename}") elif self.version == 8: - numpy.fromfile(self.fin, dtype=numpy.int16, count=12344 // 2) + numpy.fromfile(self.fin, dtype=numpy.int16, count=8344 // 2) elif self.version == 9: numpy.fromfile(self.fin, dtype=numpy.int16, count=12352 // 2) elif self.version == 10: