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

config-inited event handler has wrong signature #816

Closed
agoose77 opened this issue Feb 13, 2024 · 1 comment · Fixed by #817
Closed

config-inited event handler has wrong signature #816

agoose77 opened this issue Feb 13, 2024 · 1 comment · Fixed by #817

Comments

@agoose77
Copy link
Collaborator

agoose77 commented Feb 13, 2024

From #814 (comment)

Dear all, sorry to reopen this thread, but I'm quite sure this MR breaks the Jupyter-Book compilation. The error message is the following one:

Extension error (sphinx_book_theme):
Handler <function update_general_config at 0x7f09a7474790> for event 'config-inited' threw an exception (exception: update_general_config() takes 1 positional argument but 2 were given)
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.9/site-packages/sphinx/events.py", line 97, in emit
    results.append(listener.handler(self.app, *args))
TypeError: update_general_config() takes 1 positional argument but 2 were given

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

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.9/site-packages/jupyter_book/sphinx.py", line 114, in build_sphinx
    app = Sphinx(
  File "/home/user/.local/lib/python3.9/site-packages/sphinx/application.py", line 257, in __init__
    self.events.emit('config-inited', self.config)
  File "/home/user/.local/lib/python3.9/site-packages/sphinx/events.py", line 108, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function update_general_config at 0x7f09a7474790> for event 'config-inited' threw an exception (exception: update_general_config() takes 1 positional argument but 2 were given)

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

Traceback (most recent call last):
  File "/home/user/.local/bin/jupyter-book", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/.local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/user/.local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/.local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/user/.local/lib/python3.9/site-packages/jupyter_book/cli/main.py", line 317, in build
    builder_specific_actions(
  File "/home/user/.local/lib/python3.9/site-packages/jupyter_book/cli/main.py", line 528, in builder_specific_actions
    raise RuntimeError(_message_box(msg, color="red", doprint=False)) from result
RuntimeError: 
===============================================================================

There was an error in building your book. Look above for the cause.

===============================================================================

Steps to reproduce:

  • Install Jupyter Book: pip install jupyter-book
  • Quickly generate a sample book: jupyter-book create mynewbook/
  • Build the sample book: jupyter-book build mynewbook/

No issues found when reverting to 1.1.0 version. Thanks in advance and apologies if the culprit is not here!

Originally posted by @frgigr in #814 (comment)

Copy link

welcome bot commented Feb 13, 2024

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

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

Successfully merging a pull request may close this issue.

1 participant