Code Monkey home page Code Monkey logo

Comments (10)

maelp avatar maelp commented on May 13, 2024

I have the same issue

from flask-login.

maelp avatar maelp commented on May 13, 2024

Actually if I use

app = flask.Flask(__name__, static_folder='public', static_url_path='')

I get the error, but if I use

app = flask.Flask(__name__, static_folder='public')

it works, any idea why it is so?

from flask-login.

maxcountryman avatar maxcountryman commented on May 13, 2024

This might be fixed now.

from flask-login.

dfrocha avatar dfrocha commented on May 13, 2024

I'm having the same issue when I combine Flask-Login with Flask-Principal...
Inside the routes (@app.route... current_user) it works well but when I try to set the identity in the @identity_loaded.connect_via(app) method it doesn't find the user in the ctx. I'm using Flask 0.9, Flask-Principal 0.3 and Flask-Login (latest downloaded from GitHub today)

from flask-login.

HeinrichFilter avatar HeinrichFilter commented on May 13, 2024

I'm having the same problem as @dfrocha

from flask-login.

maxcountryman avatar maxcountryman commented on May 13, 2024

Sorry, we can't directly support Flask-Principal. This seems to be an issue on their end. We haven't had similar reports or been able to reproduce this with just Flask-Login. Closing this.

from flask-login.

shredding avatar shredding commented on May 13, 2024

I have the same issue but am not using Flask-Principal ...

from flask-login.

chanserv avatar chanserv commented on May 13, 2024

Problem solved for me:
We have to configure flask-login before flask principal.
This portion of code generate an error

app = Flask(name)
Principal(app)
login_manager = LoginManager()
login_manager.setup_app(app)

But this code work fine for me

app = Flask(name)
login_manager = LoginManager()
login_manager.setup_app(app)
Principal(app)

from flask-login.

maxcountryman avatar maxcountryman commented on May 13, 2024

Thanks.

from flask-login.

jacobsvante avatar jacobsvante commented on May 13, 2024

I also had an error with this without Principal installed. But it turned out I had forgotten to call my configure_extensions method that initializes Flask-Login among others. So yeah, that's why the exception was raised in my case.

from flask-login.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.