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

icon_links is required even if empty? #1226

Closed
choldgraf opened this issue Mar 2, 2023 · 4 comments · Fixed by #1231
Closed

icon_links is required even if empty? #1226

choldgraf opened this issue Mar 2, 2023 · 4 comments · Fixed by #1231
Labels
kind: bug Something isn't working

Comments

@choldgraf
Copy link
Collaborator

I've heard reports that this theme will now error if icon_links is not given in conf.py, and users must set it to an empty list to avoid this error. Has anybody else experienced this?

Here's where we check icon_links:

if not isinstance(theme_options.get("icon_links", []), list):

@choldgraf choldgraf added the kind: bug Something isn't working label Mar 2, 2023
@choldgraf choldgraf changed the title Icon links is required even if empty? icon_links is required even if empty? Mar 2, 2023
@janash
Copy link

janash commented Mar 3, 2023

Yes, I have experienced this.

@hakonanes
Copy link

I just got the following traceback from a Read The Docs build using Python 3.9 and PyData Sphinx Theme 0.13:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/orix/envs/433/lib/python3.9/site-packages/sphinx/events.py", line 94, in emit
    results.append(listener.handler(self.app, *args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/orix/envs/433/lib/python3.9/site-packages/pydata_sphinx_theme/__init__.py", line 202, in update_config
    theme_options["icon_links"].insert(
KeyError: 'icon_links'

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

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/orix/envs/433/lib/python3.9/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/home/docs/checkouts/readthedocs.org/user_builds/orix/envs/433/lib/python3.9/site-packages/sphinx/application.py", line 262, in __init__
    self._init_builder()
  File "/home/docs/checkouts/readthedocs.org/user_builds/orix/envs/433/lib/python3.9/site-packages/sphinx/application.py", line 335, in _init_builder
    self.events.emit('builder-inited')
  File "/home/docs/checkouts/readthedocs.org/user_builds/orix/envs/433/lib/python3.9/site-packages/sphinx/events.py", line 105, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function update_config at 0x7f1ec55cc4c0> for event 'builder-inited' threw an exception (exception: 'icon_links')

Extension error (pydata_sphinx_theme):
Handler <function update_config at 0x7f1ec55cc4c0> for event 'builder-inited' threw an exception (exception: 'icon_links')

Is this the error in question?

@hakonanes
Copy link

Sorry, just saw #1220. So the answer is yes, I see this as well...

@lwasser
Copy link
Contributor

lwasser commented Mar 5, 2023

i am getting this too - also getting a warning from Jupyter i think?

WARNING: `footer_items` is deprecated. Use `footer_start` or `footer_end` instead.

setting icon_links = [] does not work for me but could also be user error! happy to test things if more information is helpful.

Handler <function update_config at 0x1472534c0> for event 'builder-inited' threw an exception (exception: 'icon_links')

UPDATE: i do see i may need to update our footer info in conf.py hence the warning! so the icon_links is the only bug that i see :) pinning to v0.12 in Ci is working well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants