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

"soft_unicode" is not supported in latest markupsafe #263

Open
shibukazu opened this issue Feb 18, 2022 · 2 comments · May be fixed by #301
Open

"soft_unicode" is not supported in latest markupsafe #263

shibukazu opened this issue Feb 18, 2022 · 2 comments · May be fixed by #301

Comments

@shibukazu
Copy link
Contributor

Problem

When atcoder-tools is newly installed, the latest version of markupsafe is used.
In that case, we could not execute "atcoder-tools gen" using jinja2.

Solution

I was able to solve this problem following this step.

  1. Clone this repo.
  2. Set the version of markupsafe to 2.0.1. in your local repo like below.
[tool.poetry.dependencies]
python = "^3.6"
beautifulsoup4 = "^4.9.3"
requests = "^2.25.1"
colorama = "^0.4.4"
toml = "^0.10.2"
Jinja2 = "^2.11.3"
markupsafe = "2.0.1"
  1. Execute "poetry update", and confirm that the version of markupsafe in poetry.lock is 2.0.1.
  2. Execute "pip3 install [your local repo path]"

Ref

@chum0n
Copy link

chum0n commented Mar 10, 2022

Thank you for sharing your solution! I have solved the problem with the following method: downgrading markupsafe with the pip command.

$ pip list | grep MarkupSafe
MarkupSafe 2.1.0

$ pip install MarkupSafe==2.0.1

$ pip list | grep MarkupSafe
MarkupSafe 2.0.1

k1832 pushed a commit to k1832/cpp-environment that referenced this issue Mar 27, 2022
version 2.1.0 (which is the latest one) is not working for some reason.
Refer: kyuridenamida/atcoder-tools#263 (comment)
@mo124121
Copy link
Contributor

I also encountered this issue during setup of new environment for 2023 judge.

I found that this issue comes from that jinja2 doesn't pin markupsafe version, but it seems that jinja maintainer don't have plan to fix it because jinja 2.11.x is unsupported version.
pallets/jinja#1606

I think that the ideal way to solve this issue is to update dependency of jinja version on atcoder-tools. However, jinja dev. already moved to 3.x and major version up might cause trouble without investigation. Therefore, pinning markupsafe on atcoder-tools is realistic way to solve this issue.

@0num4 0num4 linked a pull request Oct 12, 2024 that will close this issue
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.

3 participants