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

Dashboard does not work with latest flask (3.0.0) #106

Closed
harmenwassenaar opened this issue Nov 13, 2023 · 2 comments
Closed

Dashboard does not work with latest flask (3.0.0) #106

harmenwassenaar opened this issue Nov 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@harmenwassenaar
Copy link
Collaborator

----> 1 from mpire.dashboard.dashboard import connect_to_dashboard, start_dashboard

~/Projects/mpire/mpire/dashboard/dashboard.py in <module>
      9 from typing import Dict, Optional, Sequence, Union
     10 
---> 11 from flask import escape, Flask, jsonify, render_template, request
     12 from werkzeug.serving import make_server
     13 

ImportError: cannot import name 'escape' from 'flask' (~/Projects/mpire/venv/lib64/python3.11/site-packages/flask/__init__.py)
@harmenwassenaar harmenwassenaar added the bug Something isn't working label Nov 13, 2023
@harmenwassenaar
Copy link
Collaborator Author

Apparently importing escape from flask was deprecated, and has now been removed. Importing it from markupsafe fixes it, and should be compatible with earlier versions as well.

@NiceBenn
Copy link

i have solved this problem by importing if from markupsafe , really thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants