diff --git a/src/NanoParticleTools/species_data/species.py b/src/NanoParticleTools/species_data/species.py index dc209e9..788b10e 100644 --- a/src/NanoParticleTools/species_data/species.py +++ b/src/NanoParticleTools/species_data/species.py @@ -204,7 +204,7 @@ def species_data(self) -> dict[str, tuple[list[str], list[float]]]: with open(os.path.join(SPECIES_DATA_PATH, f'{symbol}.json'), 'r') as f: species_data = json.load(f) - except FileNotFoundError: + except FileNotFoundError as e: # File was not found, check if it is a legacy calc if self.symbol in self.LEGACY_SURFACE_NAMES: # This is a legacy calc. Load the corresponding calc @@ -212,6 +212,8 @@ def species_data(self) -> dict[str, tuple[list[str], list[float]]]: with open(os.path.join(SPECIES_DATA_PATH, f'{symbol}.json'), 'r') as f: species_data = json.load(f) + else: + raise e return species_data