Skip to content

🐛 Schema auto-documentation fails #28

@e-lo

Description

@e-lo

Describe the problem

{{ frictionless_schemas() }} generates following error when run using Github Actions or locally using mike deploy or mike serve respectfully...but does not generate any errors when run locally using mkdocs build. There seems to be something going on with the file discovery?

frictionless.exception.FrictionlessException: [schema-error] Schema is not valid: descriptor is not valid (Schema is not valid: names of the fields are not unique)

Steps to reproduce

Full Traceback

Macro Rendering Error[¶](https://e-lo.github.io/GMNSpy/main/spec/#macro-rendering-error)
File: spec.md

FrictionlessException: [schema-error] Schema is not valid: descriptor is not valid (Schema is not valid: names of the fields are not unique)

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/mkdocs_macros/plugin.py", line 523, in render
    return md_template.render(**page_variables)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 102, in top-level template code
  File "/home/runner/work/GMNSpy/GMNSpy/main.py", line 117, in frictionless_schemas
    return document_schemas_to_md(schema_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/GMNSpy/GMNSpy/gmnspy/schema.py", line 134, in document_schemas_to_md
    s = frictionless.Schema(sf)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/frictionless/metadata.py", line 42, in __call__
    obj = cls.__create__(*args, **kwargs)  # type: ignore
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/frictionless/schema/schema.py", line 82, in __create__
    return cls.from_descriptor(descriptor, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/frictionless/metadata.py", line 184, in from_descriptor
    raise FrictionlessException(error, reasons=errors)
frictionless.exception.FrictionlessException: [schema-error] Schema is not valid: descriptor is not valid (Schema is not valid: names of the fields are not unique)

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions