Skip to content

Import issue with versions in requirements.txt #78

Closed
@igi-chris

Description

@igi-chris

When I try to run the sample app I get an import issue (running from flask import Flask):

Traceback (most recent call last):
  File "d:\code\ms-identity-python-webapp-master\app.py", line 3, in <module>
    from flask import Flask
  File "D:\code\ms-identity-python-webapp-master\.venv\lib\site-packages\flask\__init__.py", line 14, in <module>
    from jinja2 import escape
  File "D:\code\ms-identity-python-webapp-master\.venv\lib\site-packages\jinja2\__init__.py", line 12, in <module>
    from .environment import Environment
  File "D:\code\ms-identity-python-webapp-master\.venv\lib\site-packages\jinja2\environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "D:\code\ms-identity-python-webapp-master\.venv\lib\site-packages\jinja2\defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "D:\code\ms-identity-python-webapp-master\.venv\lib\site-packages\jinja2\filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (D:\code\ms-identity-python-webapp-master\.venv\lib\site-packages\markupsafe\__init__.py)

I can get around this by removing the < constraints in the requirements.txt file (basically allowing flask v2+ seems to fix the issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions