Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension Error #161

Closed
webpunk opened this issue Dec 5, 2020 · 4 comments
Closed

Extension Error #161

webpunk opened this issue Dec 5, 2020 · 4 comments

Comments

@webpunk
Copy link

webpunk commented Dec 5, 2020

Hi,

when using sphinx-js, I always get the following error:

Extension error:
Handler <function analyze at 0x7f83e0261280> for event 'builder-inited' threw an exception

Do you have any idea what that means or how I can fix it?

Bye
Christian

@erikrose
Copy link
Contributor

erikrose commented Dec 5, 2020 via email

@erikrose
Copy link
Contributor

I'll re-open if you can add more info. Thanks!

@klayveR
Copy link

klayveR commented Mar 19, 2021

I receive the same error.

Sphinx v3.5.2
TypeDoc 0.20.32
TypeScript 4.2.3
sphinx-js 3.1

I edited my conf.py to include the following, nothing else was changed.

extensions = ['sphinx_js']
js_language = 'typescript'
primary_domain = 'js'
js_source_path = '../src'

Here's the full traceback:

Traceback (most recent call last):
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx\events.py", line 111, in emit
    results.append(listener.handler(self.app, *args))
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx_js\__init__.py", line 60, in analyze
    app._sphinxjs_analyzer = analyzer.from_disk(abs_source_paths,
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx_js\typedoc.py", line 40, in from_disk
    return cls(json, base_dir)
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx_js\typedoc.py", line 29, in __init__
    ir_objects = self._convert_all_nodes(json)
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx_js\typedoc.py", line 113, in _convert_all_nodes
    converted, more_todo = self._convert_node(todo.pop())
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx_js\typedoc.py", line 154, in _convert_node
    constructor, members = self._constructor_and_members(node)
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx_js\typedoc.py", line 100, in _constructor_and_members
    ir, _ = self._convert_node(child)
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx_js\typedoc.py", line 190, in _convert_node
    first_sig['sources'] = node['sources']
KeyError: 'sources'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx\cmd\build.py", line 276, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx\application.py", line 278, in __init__
    self._init_builder()
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx\application.py", line 337, in _init_builder
    self.events.emit('builder-inited')
  File "c:\users\tobia\appdata\local\programs\python\python39\lib\site-packages\sphinx\events.py", line 119, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function analyze at 0x000002323704DEE0> for event 'builder-inited' threw an exception (exception: 'sources')

@erikrose
Copy link
Contributor

Ah, this is the same as #166. Thanks!

hoodmane added a commit to hoodmane/sphinx-js that referenced this issue May 7, 2024
_visit_sig_parameter_list doesn't exist in Sphinx 6 so we need to reimplement it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants