diff --git a/src/alphafold3/data/templates.py b/src/alphafold3/data/templates.py index 06950ff4b09020afe47aca7017bcec22b4536c2d..56d8a0930fb6422e419f285db843d70e8610a165 100644 --- a/src/alphafold3/data/templates.py +++ b/src/alphafold3/data/templates.py @@ -851,10 +851,11 @@ def package_template_features( def _resolve_path(path: os.PathLike[str] | str) -> str: """Resolves path for data dep paths, stringifies otherwise.""" - try: - # Data dependency paths: db baked into the binary. - return resources.filename(path) - except (FileNotFoundError, ValueError): + # Data dependency paths: db baked into the binary. + resolved_path = resources.filename(path) + if os.path.exists(resolved_path): + return resolved_path + else: # Other paths, e.g. local. return str(path)