NiklasRosenstein / pydoc-markdown

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

InvalidTypeDefinitionError on a new install of pydoc-markdown #126

Closed DG-SHeather closed 4 years ago

DG-SHeather commented 4 years ago

Issue Description

on a new install of pydoc-markdown I am getting an InvalidTypeDefinitionError exception upon execution.

Code to Reproduce the Issue

pipx install pydoc-markdown
pydoc-markdown --help 

Error Details

Traceback (most recent call last):
  File "c:\users\su_heathes\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\su_heathes\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\su_heathes\.local\bin\pydoc-markdown.exe\__main__.py", line 4, in <module>
  File "c:\users\su_heathes\.local\pipx\venvs\pydoc-markdown\lib\site-packages\pydoc_markdown\__init__.py", line 31, in <module>
    from pydoc_markdown.interfaces import Loader, Processor, Renderer
  File "c:\users\su_heathes\.local\pipx\venvs\pydoc-markdown\lib\site-packages\pydoc_markdown\interfaces.py", line 38, in <module>
    @SerializeAs(UnionType.with_entrypoint_resolver('pydoc_markdown.interfaces.Loader'))
  File "c:\users\su_heathes\.local\pipx\venvs\pydoc-markdown\lib\site-packages\nr\databind\core\decorations.py", line 208, in __init__
    self.datatype = translate_type_def(datatype)
  File "c:\users\su_heathes\.local\pipx\venvs\pydoc-markdown\lib\site-packages\nr\databind\core\datatypes.py", line 485, in translate_type_def
    raise InvalidTypeDefinitionError(py_type_def)
nr.databind.core.InvalidTypeDefinitionError: None

pydoc-markdown Version

3.1.0

Python Version

Python 3.8.3

Operating System

Windows 10

StarfallProjects commented 4 years ago

I came here to report the same problem. Weirdly, I did a new install last week to try it out and did not have the issue. Started fresh today, and boom - error.

Same version and system specs as the original report.

StarfallProjects commented 4 years ago

One of our devs took a look. The issue is related to a dependency. As a temporary workaround, try:

pip install nr.databind.core==0.0.16
DG-SHeather commented 4 years ago

Thanks @StarfallProjects, that is definitely the problem, but when pydoc-markdown has been installed using pipx, you need to run the following as a workaround instead:

pipx inject pydoc-markdown nr.databind.core==0.0.16
NiklasRosenstein commented 4 years ago

Hey @DG-SHeather , thanks for reporting the issue. This is fixed in nr.databind.core==0.0.18 and pydoc-markdown==3.1.1 was released which requires nr.databind.core ~0.0.18 to avoid picking up the bad 0.0.17 version by any chance.

DG-SHeather commented 4 years ago

Cheers @NiklasRosenstein, I can confirm that pydoc-markdown v3.1.1 has fixed this issue for me.