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

Current dependency resolvement leads to "'logo' is undefined" error #1396

Closed
nicoa opened this issue Dec 30, 2022 · 5 comments
Closed

Current dependency resolvement leads to "'logo' is undefined" error #1396

nicoa opened this issue Dec 30, 2022 · 5 comments
Labels
Bug A bug Needed: replication Bug replication is required

Comments

@nicoa
Copy link

nicoa commented Dec 30, 2022

FYI: writing this in case others run into the same issue. It will be resolved when this theme allows sphinx<7 as a dependency, as done for example in #1385

As written here, sphinx 6.0 was released. This is not supported by the current sphinx-rtd-theme version, so the latest one not pinned seems to be 0.5.1.

When installing like pip install sphinx sphinx-rtd-theme, one would need to pin sphinx to be <6 (if not simply using sphinx-rtd-theme directly without explicitly stating sphinx) to avoid falling back to that old version.

This yields the following error:

Reason: UndefinedError("'logo' is undefined")

I'd expect this to be resolved by #1385 .

Optional: maybe it makes sense to add pinned dependencies on the old version lines as well so that pip resolves to sphinx 5.x instead. Let me know your opinion :)

@nicoa nicoa added Bug A bug Needed: replication Bug replication is required labels Dec 30, 2022
@benjaoming
Copy link
Contributor

Hi @nicoa !

Thanks for the report. To understand the error better, would you be able to post a full traceback? You can for instance run sphinx-build -b html -T docs/ html/ (or see: https://www.sphinx-doc.org/en/master/man/sphinx-build.html)

@nicoa
Copy link
Author

nicoa commented Dec 30, 2022

Hey @benjaoming thanks for pointing out that option (really helpful!). I made a mistake here and thought it is this theme as this was downgraded by pip - anyways, we are using a different theme which actually caused the error. Sorry for any confusion! I'll close this, please reopen if there is anything left to clarify.

Besides that: The pinning probably should resolved, but will be soon.

Without stating sphinx it's resolving as expected:

❯ virtualenv venv
…
❯ source venv/bin/activate
❯ pip install sphinx-rtd-theme
Looking in indexes: …, https://pypi.org/simple, …
…
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.1 Pygments-2.13.0 alabaster-0.7.12 babel-2.11.0 certifi-2022.12.7 charset-normalizer-2.1.1 docutils-0.17.1 idna-3.4 imagesize-1.4.1 importlib-metadata-5.2.0 packaging-22.0 pytz-2022.7 requests-2.28.1 snowballstemmer-2.2.0 sphinx-5.3.0 sphinx-rtd-theme-1.1.1 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 urllib3-1.26.13 zipp-3.11.0

with stating:

❯ virtualenv venv
…
❯ pip install sphinx sphinx-rtd-theme
Looking in indexes: …,https://pypi.org/simple,…
…
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.1 Pygments-2.13.0 alabaster-0.7.12 babel-2.11.0 certifi-2022.12.7 charset-normalizer-2.1.1 docutils-0.19 idna-3.4 imagesize-1.4.1 importlib-metadata-5.2.0 packaging-22.0 pytz-2022.7 requests-2.28.1 snowballstemmer-2.2.0 sphinx-6.0.0 sphinx-rtd-theme-0.5.1 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 urllib3-1.26.13 zipp-3.11.0

which is leading to version 0.5.1 of this theme - probably not intended to be used with sphinx 6 I guess.

@nicoa nicoa closed this as completed Dec 30, 2022
@benjaoming
Copy link
Contributor

@nicoa In the second example, I think the resolver finds the latest docutils 0.19 for Sphinx 6.0.0 and then picks sphinx-rtd-theme 0.5.1 from before we started introducing upper boundaries on stuff. This will definitely not work :)

We'll have a pre-release out soon so we can have some level of support introduced and test that stuff works with Sphinx 6, then release a new stable sphinx-rtd-theme after New Years...

@nicoa
Copy link
Author

nicoa commented Dec 30, 2022

Yes, saw that for next release support for 6 is planned, great 👍

Thought it would maybe possible to introduce boundaries on old versions as well, but that's obviously up to you :-)

anyways, issue resolved, will re-open in the proper theme repo :-D

@nicoa
Copy link
Author

nicoa commented Jan 1, 2023

fyi: now the error described is (correctly) reported at pydata/pydata-sphinx-theme#1094

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: replication Bug replication is required
Projects
None yet
Development

No branches or pull requests

2 participants