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

ReadTheDocs build failed #1333

Closed
RogerHaase opened this issue Jan 16, 2023 · 3 comments · Fixed by #1336 or #1344
Closed

ReadTheDocs build failed #1333

RogerHaase opened this issue Jan 16, 2023 · 3 comments · Fixed by #1336 or #1344

Comments

@RogerHaase
Copy link
Member

From ReadTheDocs email:

--snip--
Installed /home/docs/checkouts/readthedocs.org/user_builds/moin-20/envs/latest/lib/python3.11/site-packages/cachelib-0.9.0-py3.11.egg
error: Jinja2 2.11.3 is installed but Jinja2<4.0.0,>=3.1.2 is required by {'Flask-Babel'}

Ran m extras to install scrips needed to reproduce problem locally:

--snip--
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flask 1.1.4 requires Jinja2<3.0,>=2.10.1, but you have jinja2 3.1.2 which is incompatible.
moin 2.0.0a12.dev76+gcc8fc0a7.d20230116 requires docutils<0.18, but you have docutils 0.19 which is incompatible.
moin 2.0.0a12.dev76+gcc8fc0a7.d20230116 requires Jinja2<3.0.0, but you have jinja2 3.1.2 which is incompatible.

Ran m docs to build local docs, seems successful with a few warnings:

--snip--
Running Sphinx v6.1.3
WARNING: logo file 'Logo_MoinMoin.png' does not exist
WARNING: favicon file 'favicon.ico' does not exist
loading pickled environment... failed
failed: Can't get attribute '_stable_repr_object' on <sphinx.deprecation._ModuleWrapper object at 0x0000014D759437F0>

Tried to start server to view local docs:

(moin-venv-python) C:\git\moin>m run
Traceback (most recent call last):
  File "C:\GIT\moin-venv-python\Scripts\moin-script.py", line 33, in <module>
    sys.exit(load_entry_point('moin', 'console_scripts', 'moin')())
  File "C:\GIT\moin-venv-python\Scripts\moin-script.py", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "C:\Users\haase\AppData\Local\Programs\Python\Python310\lib\importlib\metadata\__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "C:\Users\haase\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "c:\git\moin\src\moin\scripts\__init__.py", line 11, in <module>
    from flask_script import Manager, Server, Command
  File "C:\GIT\moin-venv-python\lib\site-packages\flask_script\__init__.py", line 14, in <module>
    from flask import Flask
  File "C:\GIT\moin-venv-python\lib\site-packages\flask\__init__.py", line 14, in <module>
    from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2' (C:\GIT\moin-venv-python\lib\site-packages\jinja2\__init__.py)

Downgraded jinja2 and docutils:

pip install jinja2==2.11.3
pip install docutils==0.17.1

Server stars successfully, local docs are OK

@UlrichB22
Copy link
Collaborator

I will create a PR in the next days to raise flask, werkzeug and jinja2 to the versions mentioned in #1109. This should hopefully fix the issue. Just successfully run a quick test in my environment.

Readthedocs is already using python3.11, we are using 3.8, 3.9 and 3.10 in our tests.

@UlrichB22
Copy link
Collaborator

Full build logs can be found at https://readthedocs.org/projects/moin-20/builds/.
The main difference seems to be flask-babel. The last successful build used 2.0.0, the failing build used 3.0.0 which has been released yesterday 16.01.2023

@UlrichB22
Copy link
Collaborator

There is a special handling for old projects in readthedocs that pins sphinx and sphinx-rtd-theme to old versions, see
readthedocs/readthedocs.org#7858

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.

2 participants