Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError at /complete/facebook/ #36

Closed
aldorodz opened this issue Sep 20, 2013 · 6 comments
Closed

TypeError at /complete/facebook/ #36

aldorodz opened this issue Sep 20, 2013 · 6 comments

Comments

@aldorodz
Copy link

Sorry, but I have really strong integration of this plugin with my project, and I've been struggling with this problem and i can't found the solution.

  • When I login with twitter working properly.
  • When I associate my current account to my facebook working properly
  • But when I try to login with my facebook account without user login it redirects to /complete/facebook/?redirect_state=(to big param) when should redirect me to "/" path and it throw me a error i think this it's a bug but maybe not.
TypeError at /complete/facebook/

datetime.datetime(2013, 11, 19, 8, 1, 8, 318871, tzinfo=<UTC>) is not JSON serializable

Request Method: GET
Request URL: (url)/complete/facebook/?redirect_state=(long param)
Django Version: 1.5.4
Exception Type: TypeError
Exception Value:    
datetime.datetime(2013, 11, 19, 8, 1, 8, 318871, tzinfo=<UTC>) is not JSON serializable
Exception Location: (path)/python/lib/python2.7/json/encoder.py in default, line 178

-----EDIT
I think it might be a problem with the redirect, in facebook app there is a other different a /complete/facebook/ maybe it ignores it for some reason

Thanks

@omab
Copy link
Owner

omab commented Sep 21, 2013

/complete/facebook/ is called to complete the auth process, if sucessful you will get redirected to / after that. Do you have a custom pipeline? Is this a partial pipeline?

@famoraes
Copy link

I had this problem too. My solution was remove/comment the SESSION_SERIALIZER on settings.py, that is json by default.

@maoaiz
Copy link

maoaiz commented Oct 1, 2013

I have the same problem too. The @famoraes solution is good for me, (thanks for that), but... what is the correct solution? what happen if I need the SESSION_SERIALIZER var?

@eugeniol
Copy link

eugeniol commented Oct 2, 2013

I have the same issue, is it addressed to JSON serializer ?

@omab
Copy link
Owner

omab commented Oct 2, 2013

Seems like the values being saved in the session during partial-pipeline operations should be cleaned up a bit in order to avoid this issues. Previously this wasn't an issue because the default serialization method was pickle, but that's going to change shortly in Django 1.6.

@omab
Copy link
Owner

omab commented Oct 3, 2013

The changes above take care of the serialization problem.

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

No branches or pull requests

5 participants