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

Fix publish-docs #206

Closed
forsyth2 opened this issue Apr 1, 2022 · 5 comments · Fixed by #207 or #208
Closed

Fix publish-docs #206

forsyth2 opened this issue Apr 1, 2022 · 5 comments · Fixed by #207 or #208
Labels
DevOps CI/CD, configuration, etc. semver: bug Bug fix (will increment patch version)

Comments

@forsyth2
Copy link
Collaborator

forsyth2 commented Apr 1, 2022

Fix publish-docs in the workflow. ImportError: cannot import name 'environmentfilter' from 'jinja2' (/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/jinja2/__init__.py) appears in https://github.com/E3SM-Project/zstash/runs/5795869500?check_suite_focus=true. This issue was introduced with the merging of #205.

@forsyth2 forsyth2 added semver: bug Bug fix (will increment patch version) DevOps CI/CD, configuration, etc. labels Apr 1, 2022
@forsyth2
Copy link
Collaborator Author

forsyth2 commented Apr 1, 2022

@tomvothecoder I don't know why this didn't happen with E3SM-Project/e3sm_diags#576 and https://github.com/E3SM-Project/e3sm_diags/actions. Because in #205 zstash was upgraded from an older version than E3SM Diags was at?

@tomvothecoder
Copy link
Collaborator

I think you are right. zstash was using black=20.8b1 in pre-commit, so it probably didn't contain the same bug as black=22.1.0.

For this specific issue, jinja2 needs to be pinned < 3.1.
Related issues

Pin locations:

@forsyth2
Copy link
Collaborator Author

forsyth2 commented Apr 4, 2022

@tomvothecoder Looks like the fixes in #207 didn't work: https://github.com/E3SM-Project/zstash/runs/5821359209?check_suite_focus=true fails with:

Run pip install sphinx==3.5.1 sphinx_rtd_theme==0.5.1 sphinx-multiversion==0.2.4 docutils==0.16 jinja2<3.1
  pip install sphinx==3.5.1 sphinx_rtd_theme==0.5.1 sphinx-multiversion==0.2.4 docutils==0.16 jinja2<3.1
  shell: /usr/bin/bash -l {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.7.12/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.12/x64/lib
/home/runner/work/_temp/757fff76-faa8-4d7a-9725-b4631e956582.sh: line 1: 3.1: No such file or directory
Error: Process completed with exit code 1.

@tomvothecoder
Copy link
Collaborator

@forsyth2 To denote version ranges with pip, you have to put the package in quotations.

https://stackoverflow.com/questions/8795617/how-to-pip-install-a-package-with-min-and-max-version-range

In this case, it would be pip install sphinx==3.5.1 sphinx_rtd_theme==0.5.1 sphinx-multiversion==0.2.4 docutils==0.16 "jinja2<3.1".

@forsyth2
Copy link
Collaborator Author

forsyth2 commented Apr 5, 2022

@tomvothecoder Thanks, that fixed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps CI/CD, configuration, etc. semver: bug Bug fix (will increment patch version)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants