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

Sphinx 6.0.0: Theme Error: Reason: UndefinedError("'logo' is undefined") #1094

Closed
juliotux opened this issue Dec 30, 2022 · 10 comments · Fixed by #1097
Closed

Sphinx 6.0.0: Theme Error: Reason: UndefinedError("'logo' is undefined") #1094

juliotux opened this issue Dec 30, 2022 · 10 comments · Fixed by #1097
Labels
impact: block-release Should block a release from happening. Only use if this is a critical problem we don't want to ship
Milestone

Comments

@juliotux
Copy link

After upgrade to sphinx==6.0.0, a ThemeError is raised. This error disapear when using another theme, so I think it's related to pydata_sphinx_theme.

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [  0%] api/astropop.astrometry.AstrometricSolution                                                                                                 
Theme error:
An error happened in rendering the page api/astropop.astrometry.AstrometricSolution.
Reason: UndefinedError("'logo' is undefined")
make: *** [Makefile:45: html] Error 2
@pgjones
Copy link
Contributor

pgjones commented Dec 30, 2022

I'm also seeing this on a different project.

pgjones added a commit to pgjones/quart-auth that referenced this issue Dec 31, 2022
@sdpython
Copy link

I added a section logo in html_theme_options and it worked:

html_theme_options = {
   "logo": {
      "image_light": "logo-light.png",
      "image_dark": "logo-dark.png",
   }
}

@12rambau
Copy link
Collaborator

12rambau commented Jan 1, 2023

The problem is coming from here:

{% set is_logo = logo or theme_logo.get("image_light") or theme_logo.get("image_dark") %}

I need to investigate but it seems the default "logo" (provided by Sphinx itself) is not reaching the template anymore.

As a workaround and as @sdpython suggested, you can rely on the html_theme_options logo to overwrite Sphinx definition.

@mgeier
Copy link

mgeier commented Jan 1, 2023

Apparently, logo and favicon were removed in Sphinx 6, see sphinx-doc/sphinx#11062 and sphinx-doc/sphinx#11063.

@prjemian
Copy link

prjemian commented Jan 1, 2023

I'm seeing this same error when writing the first page:

| pickling environment... done
| checking consistency... done
| preparing documents... done
| writing output... [ 25%] changes                                               
| Theme error:
| An error happened in rendering the page changes.
| Reason: UndefinedError("'logo' is undefined")

@prjemian
Copy link

prjemian commented Jan 1, 2023

No text logo anywhere in the pysumreg repository, BTW.

@prjemian
Copy link

prjemian commented Jan 1, 2023

The error was encountered in a local CI build of the publishing workflow using act. The local CI installs Downloading sphinx-6.0.0-py3-none-any.whl (3.0 MB). The error is reported on the first file to be output.

Adding an installation restriction on the Sphinx version allows the build to complete:

      - name: Install Sphinx build requirements
        run: |
          pip install setuptools-scm "sphinx<6" pydata-sphinx-theme
          echo "--------------- diagnostic pip list ---------------"
          pip list

nicoa added a commit to nicoa/pydata-sphinx-theme that referenced this issue Jan 2, 2023
komainu8 pushed a commit to groonga/groonga that referenced this issue Jan 5, 2023
Because pydata-sphinx-theme occurs problem of
pydata/pydata-sphinx-theme#1094
when we use Sphinx 6.0.0.

The cause of this problem is the following change of Sphinx.

* sphinx-doc/sphinx#11062
* sphinx-doc/sphinx#11063

Therefore we use Sphinx 5.x until pydata-sphinx-theme resolve
this problem.
kou pushed a commit to groonga/groonga that referenced this issue Jan 5, 2023
Because pydata-sphinx-theme occurs problem of
pydata/pydata-sphinx-theme#1094 when we use
Sphinx 6.0.0.

The cause of this problem is the following change of Sphinx.

* sphinx-doc/sphinx#11062
* sphinx-doc/sphinx#11063

Therefore we use Sphinx 5.x until pydata-sphinx-theme resolve this
problem.
@12rambau 12rambau added the impact: block-release Should block a release from happening. Only use if this is a critical problem we don't want to ship label Jan 8, 2023
@choldgraf choldgraf added this to the 0.13 milestone Jan 9, 2023
guilhermeleobas added a commit to guilhermeleobas/rbc that referenced this issue Jan 13, 2023
milancurcic added a commit to milancurcic/clouddrift that referenced this issue Jan 17, 2023
milancurcic added a commit to Cloud-Drift/clouddrift that referenced this issue Jan 17, 2023
@12rambau
Copy link
Collaborator

As long as 0.13 is not released, the fix we provide won't be available. Please pin the version of Sphinx to sphinx<6 in your documentation environment.

@12rambau 12rambau pinned this issue Jan 18, 2023
kaczmarj added a commit to ReproNim/neurodocker that referenced this issue Jan 19, 2023
The pydata theme we are using seems to be incompatible with sphinx 6.x
which was released recently. We prevent this version from being
installed for the time being. The error produced with sphinx 6.x is
below and is related to
pydata/pydata-sphinx-theme#1094.

This has been fixed in pydata-sphinx-theme but has not been released
yet. The fix should be part of the next release 0.13.

```
Theme error:
An error happened in rendering the page api.
Reason: UndefinedError("'logo' is undefined")
make: *** [Makefile:20: html] Error 2
```
kaczmarj added a commit to SBU-BMI/wsinfer that referenced this issue Jan 23, 2023
kaczmarj added a commit to SBU-BMI/wsinfer that referenced this issue Jan 23, 2023
* add .readthedocs.yaml with rtd build config

* fix error in spec

* install sphinx less than version 6.0

related to pydata/pydata-sphinx-theme#1094

* install torch and project with correct settings

* use setup.cfg instead of requirements file

* re-install package after install
guilhermeleobas added a commit to heavyai/rbc that referenced this issue Jan 24, 2023
* Update ReadTheDocs branch used

* add logo
pydata/pydata-sphinx-theme#1094
pnasrat added a commit to pnasrat/the-littlest-jupyterhub that referenced this issue Feb 7, 2023
Pin Sphinx to below 6.0.0 see  pydata/pydata-sphinx-theme#1094
pnasrat added a commit to pnasrat/the-littlest-jupyterhub that referenced this issue Feb 7, 2023
Pin Sphinx to below 6.0.0 see  pydata/pydata-sphinx-theme#1094
pnasrat added a commit to pnasrat/the-littlest-jupyterhub that referenced this issue Feb 7, 2023
Pin Sphinx to below 6.0.0 see  pydata/pydata-sphinx-theme#1094
pnasrat added a commit to pnasrat/the-littlest-jupyterhub that referenced this issue Feb 7, 2023
Pin Sphinx to below 6.0.0 see  pydata/pydata-sphinx-theme#1094
@leycec
Copy link

leycec commented Feb 8, 2023

Intense blocker here. Pinning sphinx<6 is non-ideal; inevitably, I forget I've even done that and then something explodes five years from now. Panic from my future self can already be heard.

Would publishing a rapid 0.12.1 patch release just addressing this specific issue be feasible instead, perhaps? Probably not – but a criminally forgetful dev-bro can beg on GitHub. 🥺

@12rambau
Copy link
Collaborator

12rambau commented Feb 8, 2023

solved in #1132 and included in 0.13.0rc1. 0.13 will be released soon.

jboynyc added a commit to jboynyc/textnets that referenced this issue Feb 10, 2023
use pre-release of pydata-sphinx-team to get around this issue:
pydata/pydata-sphinx-theme#1094
VincentRouvreau added a commit to VincentRouvreau/pydata-sphinx-theme-handson that referenced this issue Feb 14, 2023
@12rambau 12rambau unpinned this issue Feb 28, 2023
12rambau added a commit to 12rambau/pydata-sphinx-theme that referenced this issue Mar 2, 2023
* Fix extra whitespace in sidebars (pydata#1115)

* Fix extra whitespace in sidebars

* Searchbox

* Update src/pydata_sphinx_theme/__init__.py

Co-authored-by: Daniel McCloy <dan@mccloy.info>

* make test pass

* Fix template filter to remove empty files

* ABlog in template test

* Move clear search button to primary sidebar

* Move search clear button to top of article

Co-authored-by: Daniel McCloy <dan@mccloy.info>

* FIX: Use logo_url instead deprecated logo in theme (pydata#1094) (pydata#1097)

resolves pydata#1094

* ENH/MAINT: avoid overwriting the HtmlTranslator (pydata#1105)

Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Fix pydata#143
Fix pydata#94

* fix: align sidebar sliding with the buttons (pydata#1123)

* fix: aline the sidebar sliding with the buttons

* build: force test to run on all platform
if one platform is failing we cannot see if it's platform related as the other were closed

* fix: use correct path for documentation logo

* MAINT: Improve font sizing (pydata#1129)

Fix pydata#1001

* MAINT: Refactor workflows to reduce test dependencies (pydata#1136)

* MAINT: update prerelease workflow (pydata#1140)

* ABlog: Updates for new HTML structure (pydata#1118)

* ABlog: Updates for new HTML structure

* Update templates for latest release

* Bump to dev0

* Standardize logo image behavior between Sphinx and this theme (pydata#1132)

Co-authored-by: Daniel McCloy <dan@mccloy.info>
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Co-authored-by: Chris Holdgraf <choldgraf@berkeley.edu>

* 0.13.0rc1

* Build(deps): Bump http-cache-semantics from 4.1.0 to 4.1.1 (pydata#1154)

* DOC: Use only shield.io for badges in README (pydata#1152)

* Copyright semicolon (pydata#1160)

* FIX: Flex behavior should shrink header items instead of brand (pydata#1158)

Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Fixes pydata#1143

* STYLE: lint the documentation with Doc8 (pydata#1150)

Fix pydata#1139

* Add test for internationalization and translations (pydata#1138)

* FIX: Javascript incorrect check for variable (pydata#1166)

* MAINT: update pypi classifiers (pydata#1153)

Fix pydata#1106

* remove emoji from landing page (pydata#1151)

* add fa icons instead of emoji

* remove fix for emojis

* use markup for readme emojis

* use pst-color-primary instead of sd-text-primary

* make our semantic colors available as classes

* try again

---------

Co-authored-by: Daniel McCloy <dan@mccloy.info>

* FIX: Narrow scope of style rule for GitHub & GitLab link shortening (pydata#1167)

Fixes pydata#1156

* ENH: Add breadcrumbs to article header (pydata#1142)

* ENH: Add breadcrumbs to article header

* Update src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html

Co-authored-by: Tania Allard <taniar.allard@gmail.com>

* More fixes

* Improving nested page behavior

* Documenting breadcrumbs

* Update src/pydata_sphinx_theme/assets/styles/components/_breadcrumbs.scss

Co-authored-by: Rambaud Pierrick <12rambau@users.noreply.github.com>

* Breacrumbs have link color

---------

Co-authored-by: Tania Allard <taniar.allard@gmail.com>
Co-authored-by: Rambaud Pierrick <12rambau@users.noreply.github.com>

* Degrade gracefully when JavaScript is disabled (pydata#1146)

* Fix header vertical spacing and jupyter-sphinx cells (pydata#1164)

Fixes undefined

* RLS: v0.13.0rc2 (pydata#1170)

* DOCS: admonition customization (pydata#1155)

* first draft of the admonition customization

* typo in doc link

* flesh out admon. customization example; DRY

* use :code:rst instead of :literal:

* Update docs/_static/custom.css

---------

Co-authored-by: Daniel McCloy <dan@mccloy.info>

* Fix article header CSS (pydata#1171)

* “Edit this page” → “Edit on GitHub/GitLab/Bitbucket” (pydata#1177)

* “Edit this page” → “Edit on GitHub/GitLab/Bitbucket”

Fixes pydata#1172

* Add tests

* Fix typo

* Properly handle default_mode=auto when writing logos (pydata#1183)

We used to only defaulting to the light version when `default_mode` was
undefined, not when it was explicitly set to `auto`. We also need to
handle the latter, as the new test shows.

Closes pydata#1180

Co-authored-by: Jérémy Bobbio (Lunar) <lunar@softwareheritage.org>

* fix: correctly add DOM listeners (pydata#1179)

fix adding DOM listeners

* maint: update GitLab URL tests (pydata#1186)

Co-authored-by: JoerivanEngelen <joerivanengelen@hotmail.com>

* Standardize template structure in more sections (pydata#1184)

* Standardize template structure in all sections

* Fixing footer behavior

* Update docs/user_guide/layout.rst

Co-authored-by: Daniel McCloy <dan@mccloy.info>

* Remove use of id= as much as possible

---------

Co-authored-by: Daniel McCloy <dan@mccloy.info>

* maint: remove sphinx-panels support; remove deprecated config shims (pydata#1188)

* Minor style improvements to ablog (pydata#1185)

* RLS: v0.13.0rc3

* dev0

* FIX: Some style bugs (pydata#1191)

* FIX: Some style bugs

* Move link word wrap to global rule

* DOCS: Add internationalization instructions (pydata#1178)

Co-authored-by: James McKinney <26463+jpmckinney@users.noreply.github.com>

* Refactor contributing docs to be more modular (pydata#1173)

* Dev0

* Fix github gitlab brand (pydata#1194)

* RLS: v0.13.0rc4

* FIX: Make wide equations scroll (pydata#1196)

* Fix math scrollbars for realz (pydata#1198)

* Fix math scrollbars for realz

* Update src/pydata_sphinx_theme/assets/styles/content/_math.scss

* Update src/pydata_sphinx_theme/assets/styles/content/_math.scss

* copy_logo_images: do not render dynamic Sphinx template content (pydata#1204)

* copy_logo_images: do not render dynamic Sphinx template content when copying logo image files

* Update src/pydata_sphinx_theme/__init__.py

---------

Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>

* Add conditional check for last-updated template (pydata#1201)

* Add conditional check for last-updated template

* Whitespace

* Properly set configuration with app.builder.theme_options (pydata#1199)

* Properly set configuration

* Dict to values

* Making it explicit in a function

* Better name

* Fix test

* Foot

* Revert complex config set

* Clarify docs

* Use CSS transform for skip link (pydata#1206)

* feat: Add full i18n support (pydata#1192)

Co-authored-by: Daniel McCloy <dan@mccloy.info>
Co-authored-by: James McKinney <26463+jpmckinney@users.noreply.github.com>
Co-authored-by: Chris Holdgraf <choldgraf@berkeley.edu>
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>

* Dev0

* FIX: Remove icon links component when no icon links given (pydata#1209)

* RLS: 0.13.0rc5

* dev0

* FIX: Get theme options in a more robust way (pydata#1214)

* RLS: v0.13.0rc6

* Make heading-style use the font-weight-heading value (pydata#1213)

* Make heading-style use the font-weight-heading value

* Separate font-weight setting for content headers and admonitions

* Flip var to be consistent with --pst-font-weight-heading instead

* RLS: v0.13.0

* bump: dev0

* DOCS: Remove <p> from announcement sample text (pydata#1223)

---------

Co-authored-by: Chris Holdgraf <choldgraf@berkeley.edu>
Co-authored-by: Daniel McCloy <dan@mccloy.info>
Co-authored-by: Nico Albers <nico.albers@aboutyou.com>
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brendan Heberlein <bheberlein@wisc.edu>
Co-authored-by: Tania Allard <taniar.allard@gmail.com>
Co-authored-by: Lunar <lunar@debian.org>
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
Co-authored-by: Jérémy Bobbio (Lunar) <lunar@softwareheritage.org>
Co-authored-by: JoerivanEngelen <joerivanengelen@hotmail.com>
Co-authored-by: James McKinney <26463+jpmckinney@users.noreply.github.com>
Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com>
Co-authored-by: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: block-release Should block a release from happening. Only use if this is a critical problem we don't want to ship
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants