Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Attempt to fix schema download using jsdelivr instead of GitHub raw #2056

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Jun 14, 2024

See https://www.jsdelivr.com/?docs=gh and https://rawgit.com/

Attempt to fix error like the following:

Error: schemafile could not be parsed as JSON
SchemaParseError: https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.0.json
  in "/home/runner/.cache/pre-commit/repof4twk6ja/py_env-python3.9/lib/python3.9/site-packages/check_jsonschema/checker.py", line 53
  >>> return self._schema_loader.get_validator(

  caused by

  FailedFileLoadError: Failed to parse https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.0.json
    in "/home/runner/.cache/pre-commit/repof4twk6ja/py_env-python3.9/lib/python3.9/site-packages/check_jsonschema/schema_loader/readers.py", line 27
    >>> schema = callback()

    caused by

    JSONDecodeError: Expecting value: line 1 column 1 (char 0)
      in "/home/runner/.cache/pre-commit/repof4twk6ja/py_env-python3.9/lib/python3.9/site-packages/check_jsonschema/parsers/__init__.py", line 92
      >>> return loadfunc(data)

      caused by

      StopIteration: 0
        in "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/json/decoder.py", line 353
        >>> obj, end = self.scan_once(s, idx)

Source: https://github.com/Slicer/ExtensionsIndex/actions/runs/9520665504/job/26246426798?pr=2055

@jcfr jcfr merged commit 07ec2f9 into Slicer:main Jun 14, 2024
3 checks passed
@jcfr jcfr deleted the attempt-to-fix-schema-download-issue branch June 14, 2024 18:57
@lassoan
Copy link
Contributor

lassoan commented Jun 15, 2024

Nice! I've never heard of www.jsdelivr.com but seems useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants