Python Forum
Flask_table module compatibility issue: cannot import name 'Markup' from 'flask'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flask_table module compatibility issue: cannot import name 'Markup' from 'flask'
#1
Hi Team,
We are using flask_table module in one of our python flask application , After upgrade to latest version of flask 3.0.2 then we are getting
below error and observed still flask_table=0.5.0 version.

Instead of downgrading flask modules, Could we expect upgraded version of flask_table soon ?.

Could you please suggest the solution.

Error:
[Thu Mar 07 04:35:52.553399 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] from flask_table import Table, Col, LinkCol, DateCol
[Thu Mar 07 04:35:52.553405 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] File "/autohome/www/cgi-bin/Common/flaskenv/lib/python3.8/site-packages/flask_table/__init__.py", line 1, in <module>
[Thu Mar 07 04:35:52.553408 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] from .table import Table, create_table
[Thu Mar 07 04:35:52.553411 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] File "/autohome/www/cgi-bin/Common/flaskenv/lib/python3.8/site-packages/flask_table/table.py", line 5, in <module>
[Thu Mar 07 04:35:52.553413 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] from flask import Markup
[Thu Mar 07 04:35:52.553425 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] ImportError: cannot import name 'Markup' from 'flask' (/autohome/www/cgi-bin/Common/flaskenv/lib/python3.8/site-packages/flask/__init__.py)
Reply
#2
(Mar-21-2024, 11:51 AM)venkateshbalagiri Wrote: Hi Team,
We are using flask_table module in one of our python flask application , After upgrade to latest version of flask 3.0.2 then we are getting
below error and observed still flask_table=0.5.0 version.

Instead of downgrading flask modules, Could we expect upgraded version of flask_table soon ?.

Could you please suggest the solution.

Error:
[Thu Mar 07 04:35:52.553399 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] from flask_table import Table, Col, LinkCol, DateCol
[Thu Mar 07 04:35:52.553405 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] File "/autohome/www/cgi-bin/Common/flaskenv/lib/python3.8/site-packages/flask_table/__init__.py", line 1, in <module>
[Thu Mar 07 04:35:52.553408 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] from .table import Table, create_table
[Thu Mar 07 04:35:52.553411 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] File "/autohome/www/cgi-bin/Common/flaskenv/lib/python3.8/site-packages/flask_table/table.py", line 5, in <module>
[Thu Mar 07 04:35:52.553413 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] from flask import Markup
[Thu Mar 07 04:35:52.553425 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] ImportError: cannot import name 'Markup' from 'flask' (/autohome/www/cgi-bin/Common/flaskenv/lib/python3.8/site-packages/flask/__init__.py)
Reply
#3
(Mar-21-2024, 11:51 AM)venkateshbalagiri Wrote: Hi Team,
We are using flask_table module in one of our python flask application , After upgrade to latest version of flask 3.0.2 then we are getting
below error and observed still flask_table=0.5.0 version.

Instead of downgrading flask modules, Could we expect upgraded version of flask_table soon ?.

Could you please suggest the solution.

Error:
[Thu Mar 07 04:35:52.553399 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] from flask_table import Table, Col, LinkCol, DateCol
[Thu Mar 07 04:35:52.553405 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] File "/autohome/www/cgi-bin/Common/flaskenv/lib/python3.8/site-packages/flask_table/__init__.py", line 1, in <module>
[Thu Mar 07 04:35:52.553408 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] from .table import Table, create_table
[Thu Mar 07 04:35:52.553411 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] File "/autohome/www/cgi-bin/Common/flaskenv/lib/python3.8/site-packages/flask_table/table.py", line 5, in <module>
[Thu Mar 07 04:35:52.553413 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] from flask import Markup
[Thu Mar 07 04:35:52.553425 2024] [wsgi:error] [pid 3584842:tid 140662083135232] [client 10.21.18.136:56476] ImportError: cannot import name 'Markup' from 'flask' (/autohome/www/cgi-bin/Common/flaskenv/lib/python3.8/site-packages/flask/__init__.py)
In our Flask project, we are utilizing Flask Table (0.5.0), but we are receiving an issue when we upgraded to Flask 3.0.2. Is an upgraded version of Flask Table on the horizon, as opposed to a downgrade to Flask?

Error:

Error:
ImportError: cannot import name 'Markup' from 'flask'
Are you able to offer a solution?
buran write Feb-22-2025, 05:09 AM:
Link removed
Reply
#4
The project looks not maintained for a long time. Current version (the one you use) is from 2017.
There is issues in the repo since 3 Oct 2023 and even a pull request #141 from Jan 2024, but no reaction from owner/maintainer.
https://github.com/plumdog/flask_table/issues/137
I wouldn't hope it will be merged and problem(s) fixed anytime soon.
There is second one-line pull request #142 that fixes just that issue
https://github.com/plumdog/flask_table/pull/142/

You could apply this change in your code base
https://github.com/plumdog/flask_table/p...9d711113b3
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  flask.cli.NoAppException: Could not import 'app' kazu755 4 8,183 Feb-19-2023, 01:50 PM
Last Post: Larz60+
  Extract json-ld schema markup data and store in MongoDB Nuwan16 0 3,037 Apr-05-2020, 04:06 PM
Last Post: Nuwan16
  How to crawl schema markup data type using scrapy? Nuwan16 1 3,783 Mar-31-2020, 03:42 PM
Last Post: stranac
  flask to uwsgi threading issue batchenr 1 4,880 Jun-17-2019, 02:12 PM
Last Post: batchenr
  Python Import Sybase Module returning non explicit error thebeefes 2 7,295 Mar-14-2019, 07:32 PM
Last Post: Carlos
  Scrapy python import issue basheerkharoti 1 5,232 Feb-12-2018, 09:55 AM
Last Post: Larz60+
  Import error even though module is installed datafix 8 21,416 Jun-29-2017, 03:51 PM
Last Post: datafix

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020