当我尝试在我的商店中使用分层送货模块时,我收到以下错误:
TypeError at /shop/checkout/dummy/
object.__init__() takes no parameters
Request Method: GET
Request URL: http://127.0.0.1:8000/shop/checkout/dummy/
Exception Type: TypeError
Exception Value:
object.__init__() takes no parameters
Exception Location: ../../apps/shipping/modules/tiered/models.py in __init__, line 28
Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response
92. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "../../apps/payment/modules/dummy/views.py" in pay_ship_info
10. return payship.credit_pay_ship_info(request, dummy)
File "../../apps/payment/views/payship.py" in credit_pay_ship_info
141. return base_pay_ship_info(request, payment_module, credit_pay_ship_process_form, template)
File "../../apps/payment/views/payship.py" in base_pay_ship_info
132. results = form_handler(request, contact, working_cart, payment_module)
File "../../apps/payment/views/payship.py" in credit_pay_ship_process_form
79. form = _get_form(request, payment_module, *args, **kwargs)
File "../../apps/payment/views/payship.py" in _get_form
65. form = formclass(request, payment_module, *args, **kwargs)
File "../../apps/payment/forms.py" in __init__
226. super(CreditPayShipForm, self).__init__(request, paymentmodule, *args, **kwargs)
File "../../apps/payment/forms.py" in __init__
178. shipping_choices, shipping_dict = _get_shipping_choices(request, paymentmodule, self.tempCart, self.tempContact, default_view_tax=default_view_tax)
File "../../apps/payment/forms.py" in _get_shipping_choices
40. methods = shipping_methods()
File "../../apps/shipping/config.py" in shipping_methods
49. methods.extend(module.get_methods())
File "../../apps/shipping/modules/tiered/__init__.py" in get_methods
7. return [Shipper(carrier) for carrier in Carrier.objects.filter(active=True).order_by('ordering')]
File "../../apps/shipping/modules/tiered/models.py" in __init__
28. super(BaseShipper, self).__init__(self)
Exception Type: TypeError at /shop/checkout/dummy/
Exception Value: object.__init__() takes no parameters
我也在数据库中加入了运营商。
在这方面,有人可以帮助我吗?
答案 0 :(得分:1)
super(BaseShipper, self).__init__(self)
将其更改为
super(BaseShipper, self).__init__()
答案 1 :(得分:1)
在我看来,这就像一个错误并存在于Satchmo主干中。
将satchmo / apps / shipping / modules / tiered / models.py中的第28行更改为:
super(BaseShipper, self).__init__()
并重新运行。