Item prices 100x too high.

2 views
Skip to first unread message

mykdzn

unread,
May 7, 2009, 10:00:49 AM5/7/09
to Satchmo users
Running into an error. Revision 2027. Prices are being displayed 1000x
too high. For example, if an item is priced at 14.95, it's being
displayed as $1495.

When trying to process a dummy charge, I encounter this error:

RoundedDecimalError - Partial Unit Rounding Error Exception Occured

I'm running Mac OS X. I think it has something to do with my locale
settings.

They're currently set to:

LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

And I've tried changing them to.

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

No luck with either.

In my settings.py I have:

LANGUAGE_CODE = 'en_US'

Not sure if this is a bug, and if it should be posted to Satchmo
Developers.

bkev

unread,
May 8, 2009, 6:35:59 PM5/8/09
to Satchmo users
Hi there...

Yeah...I'm having the same issue still on Mac OS X (for months
now...had moved on to another project). My locale settings and
settings.py are identical to yours; ie:

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

and settings.py
LANGUAGE_CODE = 'en_US'

I'm currently on Satchmo SVN 2027 and Django SVN 10702, but this has
persisted for many, many versions - months back - at least since
Satchmo was reorganized. I don't hit this problem in Django
proper...just in Satchmo. I've experimented with quite a few
solutions, but to no avail. Don't quite know where to go from here...
(sorry, not much help). Anyone out there with a working OS X install
that cares to share their secret?

-bkev

Chris Moffitt

unread,
May 8, 2009, 6:42:33 PM5/8/09
to satchm...@googlegroups.com
It's definitely odd behavior. Do you see anything in your satchmo log file that might point us in the right direction?

-Chris

bkev

unread,
May 8, 2009, 7:36:04 PM5/8/09
to Satchmo users
Hmm...I don't think so, but maybe expert eyes can spot something my
inexperienced ones can't. Here's the log from where I request a
product page; this is what's showing at the same time as the
RoundedDecimalError is showing in my browser:

2009-05-08 23:26:11,823 wishlist.urls: DEBUG adding wishlist urls
at ^wishlist/
2009-05-08 23:26:12,407 recentlist.middleware: DEBUG Product url is
^/product/(?P<slug>[-\w]+)/
2009-05-08 23:26:12,437 root : DEBUG subtypes =
('ConfigurableProduct',)
2009-05-08 23:26:12,448 product.utils: DEBUG serialized: []
2009-05-08 23:26:12,448 product.utils: DEBUG Serialized Options
3000b: []
2009-05-08 23:26:12,457 l10n.utils : DEBUG setting locale: ('en',
'utf-8')
2009-05-08 23:26:12,457 l10n.utils : DEBUG setting locale: en
2009-05-08 23:26:12,457 l10n.utils : DEBUG setting locale:
('en_us', 'utf-8')
2009-05-08 23:26:12,458 l10n.utils : DEBUG setting locale: en_us
5-08 23:26:12,458 l10n.utils : DEBUG setting locale: en_us
locale: en_us

As an aside, I decided to compare the contents of my locale files with
one another...my en_US versions are identical to my en_US.UTF-8 ones,
and different from my en_US.ISO-8859-1 set. It looks from <a
href="http://www.satchmoproject.com/trac/wiki/
InstallationHints#Badsettings.LANGUAGE_CODE">this</a> as if they
should be identical to the ISO-8859-1 set...is that the case?

Thank you,
bkev

bkev

unread,
May 8, 2009, 7:57:25 PM5/8/09
to Satchmo users
Is it just me, or is it a little weird that it's repeatedly setting
the locale in subtly different ways on each successive line:

'en','utf-8'
en
'en_us', 'utf-8'
en_us
en_us

mykdzn...do you show anything similar?

Thanks,
bkev

PS. Of course, that last link got mangled...it's http://www.satchmoproject.com/trac/wiki/
InstallationHints#Badsettings.LANGUAGE_CODE"

mykdzn

unread,
May 9, 2009, 2:06:05 PM5/9/09
to Satchmo users
bkev: Sorry, how did you get that to display?

All: Here's a paste of the error that I get when trying to check out.

RoundedDecimalError - Partial Unit Rounding Error Exception Occured

Traceback:
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/django/
core/handlers/base.py" in get_response
92. response = callback(request, *callback_args,
**callback_kwargs)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/django/
views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/payment/modules/dummy/views.py" in
pay_ship_info
10. return payship.credit_pay_ship_info(request, dummy)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/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 "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/payment/views/payship.py" in
base_pay_ship_info
132. results = form_handler(request, contact, working_cart,
payment_module)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/payment/views/payship.py" in
credit_pay_ship_process_form
73. form.save(request, working_cart, contact,
payment_module)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/payment/forms.py" in save
277. super(CreditPayShipForm, self).save(request, cart,
contact, payment_module)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/payment/forms.py" in save
210. self.order = get_or_create_order(request, cart,
contact, self.cleaned_data)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/payment/utils.py" in get_or_create_order
45. shipping=shipping, discount=discount, update=update)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/payment/utils.py" in pay_ship_save
73. update_orderitems(new_order, cart, update=update)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/payment/utils.py" in update_orderitems
149. new_order.recalculate_total()
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/satchmo_store/shop/models.py" in
recalculate_total
812. self.force_recalculate_total(save=save)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/satchmo_store/shop/models.py" in
force_recalculate_total
895. moneyfmt(item_sub_total),
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/l10n/utils.py" in moneyfmt
137. val = trunc_decimal(val, places)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/satchmo_utils/numbers.py" in trunc_decimal
130. return round_decimal(val=val, places=places,
roundfactor='0.01', normalize=True)
File "/Users/mdizon/Sites/nyrb/ve/lib/python2.5/site-packages/
Satchmo-0.9_pre-py2.5.egg/satchmo_utils/numbers.py" in round_decimal
98. raise RoundedDecimalError(val=places, id=4, msg='places
Exceeds Decimal Context Precision')

Exception Type: RoundedDecimalError at /catalog/checkout/dummy/
Exception Value: RoundedDecimalError - Partial Unit Rounding Error
Exception Occured

bkev

unread,
May 10, 2009, 5:34:26 AM5/10/09
to Satchmo users
Hi mykdzn,

In your project directory, there should be a file called
"satchmo.log"...that's where I got my information.

-bkev

mykdzn

unread,
May 13, 2009, 9:34:12 PM5/13/09
to Satchmo users
So I resolved the issue.. By reinstalling OSX. Something must have
gotten messed up with my settings. Anyway the problem went away. Took
me awhile, but after a few hours of frustration, I bit the bullet and
did a clean install.

bkev

unread,
May 14, 2009, 6:15:13 PM5/14/09
to Satchmo users
Wonderful...that's exactly the answer I wanted to hear...(sarcasm).
Thanks mykdzn...at least I know how to fix it now.

-bkev

Bob Waycott

unread,
May 15, 2009, 10:01:11 AM5/15/09
to satchm...@googlegroups.com
I'll just chime in to say that this doesn't exactly tell us what has gone wrong and how to fix it.

Reinstalling an OS is one of those "solutions" that doesn't really solve anything.

It would be nice to actually track this down, but I can't seem to duplicate it. I am on OS X 10.5.7.

mykdzn

unread,
May 16, 2009, 5:43:08 AM5/16/09
to Satchmo users
Obviously not the ideal solution. I'm still working on reinstalling
all my apps.

On May 15, 10:01 am, Bob Waycott <bobwayc...@gmail.com> wrote:
> I'll just chime in to say that this doesn't exactly tell us what has gone
> wrong and how to fix it.
> Reinstalling an OS is one of those "solutions" that doesn't really solve
> anything.
>
> It would be nice to actually track this down, but I can't seem to duplicate
> it. I am on OS X 10.5.7.
>
Reply all
Reply to author
Forward
0 new messages