diff --git a/python/sdist/amici/antimony_import.py b/python/sdist/amici/antimony_import.py index cc23079787..545a2654bd 100644 --- a/python/sdist/amici/antimony_import.py +++ b/python/sdist/amici/antimony_import.py @@ -28,11 +28,13 @@ def antimony2sbml(ant_model: Union[str, Path]) -> str: is_file = False if is_file: - status = ant.loadAntimonyFile(ant_model) + status = ant.loadAntimonyFile(str(ant_model)) else: status = ant.loadAntimonyString(ant_model) if status < 0: - raise RuntimeError("Antimony model could not be loaded.") + raise RuntimeError( + f"Antimony model could not be loaded: {ant.getLastError()}" + ) if (main_module_name := ant.getMainModuleName()) is None: raise AssertionError("There is no Antimony module.")