You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run sphinx-js on a react typesctipt project.
running sphinx-build -v -b html -d _build/doctrees . _build/html
I get the following exception traceback:
File "/usr/local/lib/python3.8/site-packages/sphinx/events.py", line 110, in emit
results.append(listener.handler(self.app, *args))
File "/usr/local/lib/python3.8/site-packages/sphinx_js/__init__.py", line 60, in analyze
app._sphinxjs_analyzer = analyzer.from_disk(abs_source_paths,
File "/usr/local/lib/python3.8/site-packages/sphinx_js/typedoc.py", line 40, in from_disk
return cls(json, base_dir)
File "/usr/local/lib/python3.8/site-packages/sphinx_js/typedoc.py", line 29, in __init__
ir_objects = self._convert_all_nodes(json)
File "/usr/local/lib/python3.8/site-packages/sphinx_js/typedoc.py", line 113, in _convert_all_nodes
converted, more_todo = self._convert_node(todo.pop())
File "/usr/local/lib/python3.8/site-packages/sphinx_js/typedoc.py", line 166, in _convert_node
**self._top_level_properties(node))
File "/usr/local/lib/python3.8/site-packages/sphinx_js/typedoc.py", line 65, in _top_level_properties
source = node.get('sources')[0]
TypeError: 'NoneType' object is not subscriptable
I'm not sure if the cause is something I did incorrect or if it's a case that is not covered in the typedoc implementation.
The text was updated successfully, but these errors were encountered:
@erikrose thanks, I've tested it with typedoc version 0.15.0 and it has the same exact issue.
do you have a suggestion for a quick fix until the issue is resolved?
Unfortunately not. First of all, we shouldn't be saying node.get('sources')[0]; we might as well say node['sources'][0] and crash a little earlier. But that's a nitpick. This 'source' key is a vital thing, so there's no obvious way to paper over it. I wonder _top_level_properties is getting passed the wrong thing somehow. Can you reduce your code to the smallest bit that will trigger the error and share it?
I'm trying to run sphinx-js on a react typesctipt project.
running
sphinx-build -v -b html -d _build/doctrees . _build/html
I get the following exception traceback:
I'm not sure if the cause is something I did incorrect or if it's a case that is not covered in the typedoc implementation.
The text was updated successfully, but these errors were encountered: