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

【BUG】无法从“markupsafe”导入名称“soft_unicode” #32

Open
ghost opened this issue Jul 24, 2022 · 4 comments
Open

【BUG】无法从“markupsafe”导入名称“soft_unicode” #32

ghost opened this issue Jul 24, 2022 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 24, 2022

Python 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

from pyg2plot import Plot
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\pyg2plot_init_.py", line 9, in
from pyg2plot.plot import Plot # noqa
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\pyg2plot\plot.py", line 9, in
from jinja2 import Environment
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\jinja2_init_.py", line 12, in
from .environment import Environment
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\jinja2\environment.py", line 25, in
from .defaults import BLOCK_END_STRING
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\jinja2\defaults.py", line 3, in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\jinja2\filters.py", line 13, in
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\markupsafe_init_.py)

import pyg2plot
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\pyg2plot_init_.py", line 9, in
from pyg2plot.plot import Plot # noqa
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\pyg2plot\plot.py", line 9, in
from jinja2 import Environment
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\jinja2_init_.py", line 12, in
from .environment import Environment
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\jinja2\environment.py", line 25, in
from .defaults import BLOCK_END_STRING
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\jinja2\defaults.py", line 3, in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\jinja2\filters.py", line 13, in
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (C:\Users\梦云之家\AppData\Roaming\Python\Python310\site-packages\markupsafe_init_.py)

@caicaiw
Copy link

caicaiw commented Oct 11, 2022

hi,have you solved it?

@caicaiw
Copy link

caicaiw commented Oct 11, 2022

I seem to have figured it out. I suggest you change the version of Jinja2, for example, 3.0.3.

@a497823463
Copy link

from markupsafe import soft_str as soft_unicode

@a497823463
Copy link

2年没更新了,......

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