Skip to content

KeyError (ID exists) when generating documentation #160

@azuline

Description

@azuline

I have a problem similar to #154. Rather than the type lacking an id, however, the id seems to be missing from the _index property.

Running on master as of time of issue submission.

Traceback:

Traceback (most recent call last):
  File "/home/azul/devel/repertoire/backend/sphinx-js/sphinx_js/__init__.py", line 62, in analyze
    app._sphinxjs_analyzer = analyzer.from_disk(abs_source_paths,
  File "/home/azul/devel/repertoire/backend/sphinx-js/sphinx_js/typedoc.py", line 40, in from_disk
    return cls(json, base_dir)
  File "/home/azul/devel/repertoire/backend/sphinx-js/sphinx_js/typedoc.py", line 29, in __init__
    ir_objects = self._convert_all_nodes(json)
  File "/home/azul/devel/repertoire/backend/sphinx-js/sphinx_js/typedoc.py", line 113, in _convert_all_nodes
    converted, more_todo = self._convert_node(todo.pop())
  File "/home/azul/devel/repertoire/backend/sphinx-js/sphinx_js/typedoc.py", line 191, in _convert_node
    return self._convert_node(first_sig)
  File "/home/azul/devel/repertoire/backend/sphinx-js/sphinx_js/typedoc.py", line 199, in _convert_node
    params=[self._make_param(p) for p in node.get('parameters', [])],
  File "/home/azul/devel/repertoire/backend/sphinx-js/sphinx_js/typedoc.py", line 199, in <listcomp>
    params=[self._make_param(p) for p in node.get('parameters', [])],
  File "/home/azul/devel/repertoire/backend/sphinx-js/sphinx_js/typedoc.py", line 295, in _make_param
    type=self._type_name(param.get('type', {})),
  File "/home/azul/devel/repertoire/backend/sphinx-js/sphinx_js/typedoc.py", line 240, in _type_name
    node = self._index[type['id']]
KeyError: 208

The typedoc output is available at https://gist.github.com/azuline/df79ece2d0b5a26958a348857d1b6b20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions