You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jinja is a dependency of Flask and Flask V1.X.X uses the escape module from Jinja, however recently support for the escape module was [dropped in newer versions of Jinja](https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-0).
To fix this issue, simply update to the newer version of Flask V2.X.X in your requirements.txt where Flask no longer uses the escape module from Jinja.
Flask==2.1.0
Also, do note that Flask V1.X.X is no longer supported by the team. If you want to continue to use this older version, [this Github issue may help.](https://github.com/pallets/flask/issues/4494)
Traceback (most recent call last):
File "main.py", line 3, in <module>
from graphql_server.flask import GraphQLView
File "env/lib/python3.9/site-packages/graphql_server/__init__.py", line 15, in <module>
from graphql.error import format_error as format_error_default
ImportError: cannot import name 'format_error' from 'graphql.error'
Trying to resolve this brings me to #85, which says to upgrade to graphql-server 3.0.0b5, so I pin my requirements.txt and when I try to install, I get:
pip install -r requirements.txt
Requirement already satisfied: Flask>=2.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (2.2.2)
Requirement already satisfied: graphene in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 2)) (3.1.1)
Collecting graphql-server[flask]==3.0.0b5
Using cached graphql-server-3.0.0b5.tar.gz (45 kB)
Requirement already satisfied: graphql-core<3.3,>=3.2 in ./env/lib/python3.9/site-packages (from graphql-server[flask]==3.0.0b5->-r requirements.txt (line 3)) (3.2.3)
Collecting typing-extensions<5,>=4
Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
ERROR: Cannot install Flask>=2.1.0 and graphql-server[flask]==3.0.0b5 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested Flask>=2.1.0
graphql-server[flask] 3.0.0b5 depends on flask<2 and >=1
What do I do? graphql-server should be updated to support flask v2 as flask v1 is no longer maintained.
The text was updated successfully, but these errors were encountered:
I'm trying to test this with flask, but running into package compatibility issues. Using Python 3.9.6, my requirements.txt is:
which ends up giving me:
Trying to run my flask app results in
Trying to resolve that issue leads me to https://stackoverflow.com/questions/71718167/importerror-cannot-import-name-escape-from-jinja2:
Setting my requirements to:
results in
then running my app results in
Trying to resolve this brings me to #85, which says to upgrade to graphql-server 3.0.0b5, so I pin my requirements.txt and when I try to install, I get:
What do I do? graphql-server should be updated to support flask v2 as flask v1 is no longer maintained.
The text was updated successfully, but these errors were encountered: