Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

KeyError (ID exists) when generating documentation #160

Open
azuline opened this issue Nov 26, 2020 · 0 comments
Open

KeyError (ID exists) when generating documentation #160

azuline opened this issue Nov 26, 2020 · 0 comments

Comments

@azuline
Copy link

azuline commented Nov 26, 2020

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

hoodmane added a commit to hoodmane/sphinx-js that referenced this issue May 7, 2024
)

This field is always None unless the argument is a TypeXRefInternal so it makes
more sense to put it as a field.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant