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 cfe54bd commit f1d80fcCopy full SHA for f1d80fc
web/pandas_web.py
@@ -397,6 +397,16 @@ def get_context(config_fname: str, **kwargs):
397
context["source_path"] = os.path.dirname(config_fname)
398
context.update(kwargs)
399
400
+ # Validate versions.json
401
+ versions_path = os.path.join(context["source_path"], "versions.json")
402
+ if os.path.exists(versions_path):
403
+ try:
404
+ with open(versions_path, encoding="utf-8") as f:
405
+ json.load(f)
406
+ except json.JSONDecodeError as e:
407
+ sys.stderr.write(f"\n[ERROR] Invalid JSON in {versions_path}:\n{e}\n")
408
+ sys.exit(1)
409
+
410
preprocessors = (
411
get_callable(context_prep)
412
for context_prep in context["main"]["context_preprocessors"]
0 commit comments