NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
449 stars 104 forks source link

Exception with latest version #275

Open priv-kweihmann opened 1 year ago

priv-kweihmann commented 1 year ago

Environment

Describe the bug

Running the tool results in

File "/opt/hostedtoolcache/Python/3.7.15/x64/bin/pydoc-markdown", line 8, in <module>
    sys.exit(cli())
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/click/core.py", line 1[13](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:14)0, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/click/core.py", line [14](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:15)04, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.7.[15](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:16)/x64/lib/python3.7/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pydoc_markdown/main.py", line 370, in cli
    pydocmd = session.load()
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pydoc_markdown/main.py", line 1[16](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:17), in load
    config.load_config(self.config)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pydoc_markdown/__init__.py", line 113, in load_config
    result = databind.json.new_mapper().deserialize(data, type(self), filename=filename, settings=[unknown_keys()])  # type: ignore[arg-type]  # noqa: E501  # Bad databind typehint
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/objectmapper.py", line 94, in deserialize
    return self.convert(Direction.deserialize, value, type_hint, filename, pos, key, annotations, settings)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/objectmapper.py", line 83, in convert
    return ctx.convert()
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 1[19](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:20), in convert
    return converter.convert(self)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/object.py", line 112, in convert
    return self._deserialize(ctx, ctx.type)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/object.py", line 72, in _deserialize
    ctx.push(flat_field.field.type, value, name, flat_field.field).convert()
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 119, in convert
    return converter.convert(self)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/union.py", line 64, in convert
    result = child_context.convert()
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 119, in convert
    return converter.convert(self)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/object.py", line 112, in convert
    return self._deserialize(ctx, ctx.type)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/object.py", line 72, in _deserialize
    ctx.push(flat_field.field.type, value, name, flat_field.field).convert()
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 119, in convert
    return converter.convert(self)
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/collection.py", line [29](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:30), in convert
    for idx, val in enumerate(ctx.value))
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/collection.py", line 29, in <genexpr>
    for idx, val in enumerate(ctx.value))
  File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 116, in convert
    raise ConverterNotFound(self.type, self.direction)
databind.core.mapper.converter.ConverterNotFound: (ConcreteType(pydoc_markdown.util.pages.Page), <Direction.deserialize: 1>)

only difference between the latest good run and the failing is

exceptiongroup-1.0.1 > exceptiongroup-1.0.2 pydoc-markdown-4.6.3 > pydoc-markdown-4.6.4

Expected behavior

No exception, as the point release before worked fine

priv-kweihmann commented 1 year ago

Interestingly it works with 3.11.0 and 3.9.15