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

An error "cannot import name 'soft_unicode' from 'markupsafe'"pops up when launch Flask project. #6889

Closed
linette-zyy opened this issue Feb 18, 2022 · 2 comments

Comments

@linette-zyy
Copy link

Environment
image

Steps to Reproduce

  1. Create a new Flask Web Project
  2. And click "Create virtual environment" from the notification message
    image
  3. When after installing the environment successfully, press F5 to launch the project
  4. Observes

Expected behavior
The project launched successfully without any error.

Additional context and screenshots
An error pops up.
image

Output

cannot import name 'soft_unicode' from 'markupsafe' (C:\Users\vyizh12\source\repos\FlaskWebProject5\FlaskWebProject5\env\lib\site-packages\markupsafe\__init__.py)
Stack trace:
 >  File "C:\Users\vyizh12\source\repos\FlaskWebProject5\FlaskWebProject5\FlaskWebProject5\__init__.py", line 5, in <module> (Current frame)
 >    from flask import Flask
 >  File "C:\Users\vyizh12\source\repos\FlaskWebProject5\FlaskWebProject5\runserver.py", line 6, in <module>
 >    from FlaskWebProject5 import app
Loaded 'jinja2.filters'
Loaded 'jinja2.defaults'
Loaded 'jinja2.environment'
Loaded 'jinja2'
Loaded 'flask'
Loaded 'FlaskWebProject5'
Loaded '__main__'
Loaded 'runpy'
The program 'python.exe' has exited with code 0 (0x0).
@stefanweiser
Copy link

I have exactly the same problem with conan, which also uses jinja2! Seems, that there is an error in the official pip mirror.

@janikarki
Copy link

pallets/markupsafe#284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants