Skip to content

Fix : ImportError: cannot import name '_request_ctx_stack' from 'flask'#69

Open
jhanm12 wants to merge 1 commit intoplaypauseandstop:masterfrom
jhanm12:patch-1
Open

Fix : ImportError: cannot import name '_request_ctx_stack' from 'flask'#69
jhanm12 wants to merge 1 commit intoplaypauseandstop:masterfrom
jhanm12:patch-1

Conversation

@jhanm12
Copy link
Copy Markdown

@jhanm12 jhanm12 commented Feb 2, 2024

Fix : #68

@jhanm12
Copy link
Copy Markdown
Author

jhanm12 commented Feb 2, 2024

@playpauseandstop Can you please review.

@jhanm12
Copy link
Copy Markdown
Author

jhanm12 commented Feb 2, 2024

To make this package compatible with latest Flask Versions.

makise-homura added a commit to makise-homura/flask-script-ng that referenced this pull request Feb 27, 2026
Switch from `_request_ctx_stack` to `app_ctx` (Flask>2.3.3)
- See https://stackoverflow.com/questions/77240858/how-to-fix-cannot-import-name-request-ctx-stack-from-flask and playpauseandstop/Flask-And-Redis#69
- `request_ctx` is planned to be superseded by `app_ctx` in Flask>=4.0

Use `flask_script._compat` instead of `flask._compat` for `text_type` (Flask>=2.0.0)
- See https://stackoverflow.com/questions/67538056/flask-script-modulenotfounderror-no-module-named-flask-compat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImportError: cannot import name '_request_ctx_stack' from 'flask'

1 participant