NiklasRosenstein / pydoc-markdown

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

AttributeError: 'Location' object has no attribute 'Format' #246

Closed casperdcl closed 2 years ago

casperdcl commented 2 years ago

Environment

Describe the bug

GHA logs

PYTHONPATH=. pydoc-markdown --build --site-dir _site
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.2/x64/bin/pydoc-markdown", line 8, in <module>
    sys.exit(cli())
  File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/main.py", line 332, in cli
    pydocmd = session.load()
  File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/main.py", line 121, in load
    config.load_config(self.config)
  File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/__init__.py", line 119, in load_config
    self.unknown_fields.append(str(loc.push_unknown(key).format(loc.Format.PLAIN)))
AttributeError: 'Location' object has no attribute 'Format'. Did you mean: 'format'?
NiklasRosenstein commented 2 years ago

Thanks for reporting @casperdcl . I fixed this in #245 , but I can push out a hotfix on develop because that PR will not be merged for a few days still.

casperdcl commented 2 years ago

Thx, would using pydoc-markdown!=4.5.0 also work for now?

NiklasRosenstein commented 2 years ago

No sorry, that's a mistaken break in databind.core. Can you try databind.core==1.4.0?

NiklasRosenstein commented 2 years ago

Or try pydoc-markdown==4.5.1 :)