您好我安装了以下python库: https://github.com/balanced/balanced-python
当我使用该库为我的django代码中的信用卡收费时如下:
buyer = balanced.Marketplace.my_marketplace.create_buyer(
user_email, card_uri=card_uri)
我收到以下错误:
request() got an unexpected keyword argument 'config'
我的csrf保护似乎有问题。
我该怎么做才能解决此错误?
这是pip冻结:
Django==1.4.5
PIL==1.1.7
South==0.7.6
amqp==1.0.8
anyjson==0.3.3
argparse==1.2.1
balanced==0.10.0
billiard==2.7.3.21
boto==2.8.0
celery==3.0.15
certifi==0.0.8
chardet==1.0.1
cssmin==0.1.4
django-annoying==0.7.7
django-balanced==0.1.9
django-celery==3.0.11
django-celery-with-redis==3.0
django-debug-toolbar==0.9.4
django-extensions==1.1.0
django-model-utils==1.2.0
django-notifications-hq==0.5.5
django-storages==1.1.6
django-taggit==0.9.3
djangorestframework==2.2.1
djrill==0.3.1
gdata==2.0.17
iso8601==0.1.4
kombu==2.5.6
mock==1.0.1
odict==1.5.1
ply==3.4
psycopg2==2.4.6
python-dateutil==1.5
python-memcached==1.48
pytz==2012j
redis==2.7.2
requests==1.1.0
simplejson==2.3.2
six==1.2.0
slimit==0.7.4
wsgiref==0.1.2
引用错误:
ile "//env/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "//env/lib/python2.7/site-packages/django/views/generic/base.py", line 48, in view
return self.dispatch(request, *args, **kwargs)
File "//env/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(*args, **kwargs)
File "//env/lib/python2.7/site-packages/rest_framework/views.py", line 393, in dispatch
response = self.handle_exception(exc)
File "//env/lib/python2.7/site-packages/rest_framework/views.py", line 390, in dispatch
response = handler(request, *args, **kwargs)
File "//env/lib/python2.7/site-packages/rest_framework/decorators.py", line 41, in handler
return func(*args, **kwargs)
File "//cr/api/views.py", line 403, in order_bid_detail
buyer = balanced.Marketplace.my_marketplace.create_buyer(
File "//env/lib/python2.7/site-packages/balanced/utils.py", line 203, in __get__
return self.fget.__get__(obj, klass)()
File "//env/lib/python2.7/site-packages/balanced/resources.py", line 717, in wrapped
cached = f(*args, **kwargs)
File "//env/lib/python2.7/site-packages/balanced/resources.py", line 867, in my_marketplace
return cls.query.one()
File "//env/lib/python2.7/site-packages/balanced/resources.py", line 163, in one
ret = list(self[0:2])
File "//env/lib/python2.7/site-packages/balanced/resources.py", line 98, in __getitem__
res = self._slice(start, stop)
File "//env/lib/python2.7/site-packages/balanced/resources.py", line 118, in _slice
self.qs['offset'] = (self.offset or 0) + start
File "//env/lib/python2.7/site-packages/balanced/resources.py", line 203, in offset
return self._lazy_loaded['offset']
File "//env/lib/python2.7/site-packages/balanced/utils.py", line 189, in __get__
value = self.func(obj)
File "//env/lib/python2.7/site-packages/balanced/resources.py", line 177, in _lazy_loaded
response = Resource.http_client.get(page.uri)
File "//env/lib/python2.7/site-packages/balanced/http_client.py", line 117, in make_absolute_url
return http_op(client, url, **kwargs)
File "//env/lib/python2.7/site-packages/balanced/http_client.py", line 139, in get
resp = self.interface.get(uri, **kwargs)
File "//env/lib/python2.7/site-packages/requests/sessions.py", line 310, in get
return self.request('GET', url, **kwargs)
TypeError: request() got an unexpected keyword argument 'config'