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

Auth cookie parsed incorrectly #66

Open
zefciu opened this issue Feb 5, 2011 · 1 comment
Open

Auth cookie parsed incorrectly #66

zefciu opened this issue Feb 5, 2011 · 1 comment

Comments

@zefciu
Copy link

zefciu commented Feb 5, 2011

I get the following error when trying to use pyfacebook in pylons environment:
ValueError: dictionary update sequence element #0 has length 1; 2 is required
It is generated in the following line:
params = dict([part.split('=') for part in cookies[cookie_name]])
As the cookies[cookie_name] is a string, the comprehension iterates over characters. I believe that changing this line to:
params = dict([part.split('=') for part in cookies[cookie_name].split('&')])
would fix the problem, but would break compatibility with some other frameworks. What should I do?

@zefciu
Copy link
Author

zefciu commented Feb 5, 2011

Ok, in fakt split('&') was wrong. I used urlparse now and it works for me.

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

1 participant