-
-
Notifications
You must be signed in to change notification settings - Fork 104
AttributeError: 'Connection' object has no attribute 'user' #47
Comments
@tedmiston Have you checked your database to see if the proper fields were set? You may also want to set |
@mattupstate In the
In the
The initial authorization appears to be happening properly to make this database row and on Facebook to give the permissions, but the error occurs when I click the (I've also tried clearing the app permissions on Facebook and following the same steps to ensure I can reproduce it.) Edit: Also, I don't think it should matter, but I'm currently using SQLite behind SQLAlchemy. |
You'll want to create a SQLAlchemy Relationship to connect the |
Oh right, do you have |
Just looked. It has |
I can do that, I'll ping you @mattupstate when it's up so you can refresh the pythonhosted.org page. |
@mattupstate So I do not have that on the connection class (and it is not in the docs at https://pythonhosted.org/Flask-Social/). I took a minute to download the old flask-social-example, and saw this line that wasn't in the docs:
Adding this appears to fix the error on my end. Is this equivalent to what you suggested? |
Yep, that will work as well. |
@mattupstate updated on |
Awesome. Thanks for the quick responses! Edit: I guess shouldn't close this so abruptly in case you guys would like to add any additional comments. |
it's work. thanks a lot |
I'm attempting a standard implementation per the current tutorial of flask-social 1.6.2 with Flask 0.10.1 with
SQLAlchemyDatastore
running on localhost. After a user has authorized the app on Facebook and attempts to log in, this error occurs.The only spot I've diverged from the quickstart is adding
full_name
to theConnection
class because it was getting returned by the Facebook provider and throwing an error not being in the model.I thought perhaps it was actually looking for user id, but digging a little deeper to
login_user(...)
inflask_login.py
statesLogs a user in. You should pass the actual user object to this.
I'm not sure if I'm doing something wrong in my implementation, or if this is actually a bug.
Full traceback after clicking the
Login with Facebook
button:The text was updated successfully, but these errors were encountered: