Skip to content

Commit a6f0c01

Browse files
committed
be less sensitive to wrong documentation field
1 parent 949c2f0 commit a6f0c01

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/download_documentation.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
from pathlib import Path
44

55
import typer
6-
from tqdm import tqdm
7-
86
from bioimageio.spec.shared import resolve_source
7+
from tqdm import tqdm
98
from utils import yaml
109

1110

@@ -33,7 +32,12 @@ def main(
3332
else:
3433
type_ext = "md"
3534

36-
resolve_source(doc_uri, output=rdf_path.with_name(f"documentation.{type_ext}"), pbar=partial(tqdm, disable=True))
35+
try:
36+
resolve_source(
37+
doc_uri, output=rdf_path.with_name(f"documentation.{type_ext}"), pbar=partial(tqdm, disable=True)
38+
)
39+
except ValueError:
40+
_ = rdf_path.with_name("documentation.md").write_text(doc_uri)
3741

3842

3943
if __name__ == "__main__":

0 commit comments

Comments
 (0)