Reputation: 3313
Since I updated to the newest version of django facebook I get this error:
TypeError at /facebook/connect/
open() got an unexpected keyword argument 'timeout'
Here is the full trackback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.5/site-packages/django/views/decorators/csrf.py" in wrapped_view
77. return view_func(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/django_facebook/decorators.py" in _wrapped_view
92. get_persistent_graph(request, redirect_uri=current_uri)
File "/usr/lib/python2.5/site-packages/django_facebook/api.py" in get_persistent_graph
62. graph = get_facebook_graph(request, *args, **kwargs)
File "/usr/lib/python2.5/site-packages/django_facebook/api.py" in get_facebook_graph
161. code, redirect_uri=redirect_uri)
File "/usr/lib/python2.5/site-packages/open_facebook/api.py" in convert_code
251. response = cls.request('oauth/access_token', **kwargs)
File "/usr/lib/python2.5/site-packages/open_facebook/api.py" in request
75. response = cls._request(url, post_data)
File "/usr/lib/python2.5/site-packages/open_facebook/api.py" in _request
110. timeout=timeout)
Exception Type: TypeError at /facebook/connect/
Exception Value: open() got an unexpected keyword argument 'timeout'
Upvotes: 0
Views: 398
Reputation: 3313
I've "fixed" this by removing the timeout param from here:
/usr/lib/python2.5/site-packages/open_facebook/api.py
The timeout param is right below the comment saying this param could be left out for older python versions.
Upvotes: 1
Reputation: 4948
think you should try upgrading the Python version you're using (or better yet, use virtualenv!)
looks like you're using Python 2.5 which is pretty old, so maybe you're getting that error because the library is relying on that timeout= keyword argument which was probably added in 2.6 or 2.7 etc.
From https://github.com/tschellenbach/Django-facebook/blob/master/open_facebook/api.py#L92
, looks like its calling open() on a urllib2.OpenerDirector, so probably that timeout keyword arg was added there ^ at some point
Upvotes: 0