We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6da5f2 commit 2096b28Copy full SHA for 2096b28
web/pandas_web.py
@@ -441,6 +441,16 @@ def main(
441
For ``.md`` and ``.html`` files, render them with the context
442
before copying them. ``.md`` files are transformed to HTML.
443
"""
444
+ # Sanity check: validate that versions.json is valid JSON
445
+ versions_path = os.path.join(source_path, "versions.json")
446
+ with open(versions_path, encoding="utf-8") as f:
447
+ try:
448
+ json.load(f)
449
+ except json.JSONDecodeError as e:
450
+ raise RuntimeError(
451
+ f"Invalid versions.json: {e}. Ensure it is valid JSON."
452
+ ) from e
453
+
454
config_fname = os.path.join(source_path, "config.yml")
455
456
shutil.rmtree(target_path, ignore_errors=True)
0 commit comments