1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] Flask_debugtoolbar, cannot import name '_reqeust_ctx_stack' from 'flask.globals'

Discussão em 'Python' iniciado por Stack, Setembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    when i run the code on virtual environment. this is what I get.

    ImportError: cannot import name '_request_ctx_stack' from 'flask.globals'(../venv/lib/python3.10/site-packages/flask/globals.py)


    This keeps popping up after I upgrade packages.

    Here's my code.

    from flask import Flask, request, render_template, redirect, flash, session
    from flask_debugtoolbar import DebugToolbarExtension

    app = Flask(__name__)

    app.config['SECRET_KEY'] = "This is demo"
    app.config['DEBUG_TB_INTERCEPT_REDIRECTS'] = False
    deubg = DebugToolbarExtension(app)

    @app.route('/')
    def home_page():
    """Shows home page"""
    return render_template('home.html')


    these are my packages on my requirement.txtblinker==1.6.3click==8.1.7Flask==3.0.0Flask-DebugToolbar==0.13.1itsdangerous==2.1.2Jinja2==3.1.2MarkupSafe==2.1.3Werkzeug==3.0.0


    I've tried pip install flask_debugtoolbar, and I can't seem to find a solution.

    Continue reading...

Compartilhe esta Página