Sandbox prices disappear after a few minutes

11 views
Skip to first unread message

Ashkan Kazemi

unread,
Jun 17, 2015, 7:45:22 AM6/17/15
to django...@googlegroups.com
hello all.

I'm using the Sandbox version on my website, and the weird thing that is happening is that the prices are not shown after a few minutes!!! And when this happens, if someone tries adding a product to the basket, an internal error happens.

The log in the error.log is this :

ERROR 2015-05-27 18:08:05,185 base Internal Server Error: /en-gb/basket/add/277/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 394, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/oscar/apps/basket/views.py", line 304, in post
    return super(BasketAddView, self).post(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/edit.py", line 173, in post
    return self.form_valid(form)
  File "/usr/local/lib/python2.7/dist-packages/oscar/apps/basket/views.py", line 326, in form_valid
    form.cleaned_options())
  File "/usr/local/lib/python2.7/dist-packages/oscar/apps/basket/abstract_models.py", line 207, in add_product
    defaults['price_incl_tax'] = stock_info.price.incl_tax
  File "/usr/local/lib/python2.7/dist-packages/oscar/apps/partner/prices.py", line 68, in incl_tax
    return self.excl_tax + self.tax
TypeError: unsupported operand type(s) for +: 'Decimal' and 'Decimal'


But the interesting fact is, when I restart my apache (basically restart the process of application on the server), the prices are back and everything works fine!


Since I'm new to the architecture of oscar's framework, would somebody help me to see what is actually wrong? Thanks a lot in advance.
Reply all
Reply to author
Forward
0 new messages