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

Unexpected mkdocs build failure: not using project's installed mkdocs extensions. #11167

Closed
davidorme opened this issue Feb 28, 2024 · 2 comments

Comments

@davidorme
Copy link

Details

Expected Result

I'm making sure a release branch builds MkDocs pages correctly on RTD. Recent releases on the same project built without problem. See for example, this build from last week, which succeeded:

https://readthedocs.org/projects/safedata-validator/builds/23516950/

Actual Result

The new code doesn't have any changes to the RTD configuration or build process, but it fails. The package is installed using poetry and the pyproject.toml file includes all of the packages required to build the documentation in the docs group. I use poetry install --with docs to install the package requirements.

Looking at the logs, both builds successfully install via poetry. The earlier successful build then gets to the build step: python -m pip install --upgrade --no-cache-dir mkdocs and immediately finds all the required packages that have been installed by poetry. The failing build gets to the same step and does not find those installs, so installs the RTD standard mkdocs suite of packages and not the extra requirements included in poetry. So it fails when mkdocs tries to use those extensions.

I can't see what is causing this - I don't think I've changed anything that impacts this!

@collindutter
Copy link

collindutter commented Feb 28, 2024

Also facing this issue, our builds using poetry are suddenly failing. Have also made no changes to RTD or Poetry configuration. In our case the error is:

ERROR   -  Config value 'theme': Unrecognised theme name: 'material'. The available installed themes are: mkdocs, readthedocs
ERROR   -  Config value 'markdown_extensions': Failed to load extension 'pymdownx.highlight'.
ModuleNotFoundError: No module named 'pymdownx'
ERROR   -  Config value 'plugins': The "glightbox" plugin is not installed

Aborted with 3 configuration errors!

Edit: Appears to be related to #11150 and #11152. Updating poetry install to VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install resolved it.

@davidorme davidorme changed the title Unexpected build failure Unexpected mkdocs build failure: not using project's installed mkdocs extensions. Feb 28, 2024
@davidorme
Copy link
Author

Thanks for that edit @collindutter, I hadn't seen #11152 and can confirm that using VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install resolves the issue for me.

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

2 participants