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

Documentation build tool is broken due to Jinja2 #5009

Closed
rauldpm opened this issue Apr 1, 2022 · 0 comments
Closed

Documentation build tool is broken due to Jinja2 #5009

rauldpm opened this issue Apr 1, 2022 · 0 comments
Labels

Comments

@rauldpm
Copy link
Member

rauldpm commented Apr 1, 2022

Hi team

Jinja2 has been updated and the tool to build the documentation is broken, it is necessary to add at the beginning of the requirements.txt the versioning of the package as follows:

Jinja2<3.1
Sphinx==3.2.0
sphinx_tabs==1.2.1
docutils==0.16
writing output... [100%] user-manual/uninstall/open-distro                                                                                                                                                         
generating indices... done
writing additional pages...  not_found user-manual/api/reference cloud-service/apis/reference moved-content searchdone
copying images... [100%] user-manual/ruleset/ruleset-xml-syntax/../../../images/manual/ruleset/ruleset-xml-syntax/sibling-decoders-tree.png                                                                        
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in build/html.
Copying tabs assets

If not added the following error occurs

# make html
sphinx-build -b html -d build/doctrees   source build/html
Traceback (most recent call last):
  File "wazuh-documentation/my_env/bin/sphinx-build", line 5, in <module>
    from sphinx.cmd.build import main
  File "wazuh-documentation/my_env/lib/python3.9/site-packages/sphinx/cmd/build.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "wazuh-documentation/my_env/lib/python3.9/site-packages/sphinx/application.py", line 42, in <module>
    from sphinx.registry import SphinxComponentRegistry
  File "wazuh-documentation/my_env/lib/python3.9/site-packages/sphinx/registry.py", line 24, in <module>
    from sphinx.builders import Builder
  File "wazuh-documentation/my_env/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 26, in <module>
    from sphinx.util import import_object, logging, rst, progress_message, status_iterator
  File "wazuh-documentation/my_env/lib/python3.9/site-packages/sphinx/util/rst.py", line 22, in <module>
    from jinja2 import environmentfilter
ImportError: cannot import name 'environmentfilter' from 'jinja2' (wazuh-documentation/my_env/lib/python3.9/site-packages/jinja2/__init__.py)
make: *** [Makefile:75: html] Error 1

readthedocs/readthedocs.org#9038

Regards, Raul.

@rauldpm rauldpm added the cicd label Apr 1, 2022
s-ocando added a commit that referenced this issue May 3, 2022
specifying Jinja2 version in requirements.txt - issue #5009
@s-ocando s-ocando closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants