Satchmo 的分层运输问题

发布于 2024-07-25 03:34:55 字数 2472 浏览 2 评论 0原文

当我尝试在商店中使用分层运输模块时,出现以下错误:

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

我也在数据库中输入了承运商。

有人可以在这方面帮助我吗?

When I try to use the tiered shipping module in my store, I get the following error:

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

I have entered the carriers in database as well.

Can anyone help me in this regard ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

倾城泪 2024-08-01 03:34:56
super(BaseShipper, self).__init__(self)

将其更改为

super(BaseShipper, self).__init__()
super(BaseShipper, self).__init__(self)

change it to

super(BaseShipper, self).__init__()
第几種人 2024-08-01 03:34:56

在我看来,这就像一个 bug,存在于 Satchmo 后备箱中。

将 satchmo/apps/shipping/modules/tiered/models.py 中的第 28 行更改为:

super(BaseShipper, self).__init__()

并重新运行。

That looks to me like a bug and is present in Satchmo trunk.

Change line 28 in satchmo/apps/shipping/modules/tiered/models.py to:

super(BaseShipper, self).__init__()

and re-run.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文