yentsun / price_watch

An engine for price monitoring service (Pyramid + ZODB)
http://food-price.net/
1 stars 1 forks source link

500 error #15

Closed yentsun closed 9 years ago

yentsun commented 9 years ago

http://food-price.net/products/%D0%9C%D0%B0%D0%BA%D0%B0%D1%80%D0%BE%D0%BD%D0%BD%D1%8B%D0%B5%20%D0%B8%D0%B7%D0%B4%D0%B5%D0%BB%D0%B8%D1%8F%20Granmulino%20%D0%A0%D0%BE%D0%B6%D0%BA%D0%B8%20%D1%81%D0%BE%D0%BB%D0%BE%D0%BC%D0%BA%D0%B0%20400%D0%B3/

yentsun commented 9 years ago
2015-02-20 07:13:02,305 ERROR [waitress][Dummy-2] Exception when serving /products/Макаронные изделия Granmulino Рожки соломка 400г/
Traceback (most recent call last):
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/waitress-0.8.9-py2.7.egg/waitress/channel.py", line 337, in service
    task.service()
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/waitress-0.8.9-py2.7.egg/waitress/task.py", line 173, in service
    self.execute()
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/waitress-0.8.9-py2.7.egg/waitress/task.py", line 392, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid-1.5.2-py2.7.egg/pyramid/router.py", line 242, in __call__
    response = self.invoke_subrequest(request, use_tweens=True)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid-1.5.2-py2.7.egg/pyramid/router.py", line 217, in invoke_subrequest
    response = handle_request(request)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid-1.5.2-py2.7.egg/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid_tm-0.9-py2.7.egg/pyramid_tm/__init__.py", line 94, in tm_tween
    reraise(*exc_info)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid_tm-0.9-py2.7.egg/pyramid_tm/__init__.py", line 75, in tm_tween
    response = handler(request)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid-1.5.2-py2.7.egg/pyramid/router.py", line 163, in handle_request
    response = view_callable(context, request)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid-1.5.2-py2.7.egg/pyramid/config/views.py", line 329, in attr_view
    return view(context, request)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid-1.5.2-py2.7.egg/pyramid/config/views.py", line 305, in predicate_wrapper
    return view(context, request)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid-1.5.2-py2.7.egg/pyramid/config/views.py", line 355, in rendered_view
    result = view(context, request)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/pyramid-1.5.2-py2.7.egg/pyramid/config/views.py", line 477, in _class_requestonly_view
    response = getattr(inst, attr)()
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/price_watch-0.1.4_42_g2215216-py2.7.egg/price_watch/views.py", line 171, in get
    return self.served_data(self.context)
  File "/home/ubuntu/env/lib/python2.7/site-packages/dogpile.cache-0.5.4-py2.7.egg/dogpile/cache/region.py", line 1013, in decorate
    should_cache_fn)
  File "/home/ubuntu/env/lib/python2.7/site-packages/dogpile.cache-0.5.4-py2.7.egg/dogpile/cache/region.py", line 640, in get_or_create
    async_creator) as value:
  File "/home/ubuntu/env/lib/python2.7/site-packages/dogpile.core-0.4.1-py2.7.egg/dogpile/core/dogpile.py", line 158, in __enter__
    return self._enter()
  File "/home/ubuntu/env/lib/python2.7/site-packages/dogpile.core-0.4.1-py2.7.egg/dogpile/core/dogpile.py", line 98, in _enter
    generated = self._enter_create(createdtime)
  File "/home/ubuntu/env/lib/python2.7/site-packages/dogpile.core-0.4.1-py2.7.egg/dogpile/core/dogpile.py", line 149, in _enter_create
    created = self.creator()
  File "/home/ubuntu/env/lib/python2.7/site-packages/dogpile.cache-0.5.4-py2.7.egg/dogpile/cache/region.py", line 612, in gen_value
    created_value = creator()
  File "/home/ubuntu/env/lib/python2.7/site-packages/dogpile.cache-0.5.4-py2.7.egg/dogpile/cache/region.py", line 1009, in creator
    return fn(*arg, **kw)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/price_watch-0.1.4_42_g2215216-py2.7.egg/price_watch/views.py", line 149, in served_data
    data['current_price'] = self.currency(product.get_price())
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/price_watch-0.1.4_42_g2215216-py2.7.egg/price_watch/views.py", line 75, in currency
    return format_currency(value, symbol, locale=self.locale)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/Babel-1.3-py2.7.egg/babel/numbers.py", line 196, in format_currency
    return pattern.apply(number, locale, currency=currency)
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/Babel-1.3-py2.7.egg/babel/numbers.py", line 517, in apply
    value *= self.scale
TypeError: unsupported operand type(s) for *=: 'NoneType' and 'int'
yentsun commented 9 years ago

we have to deal with products that have no current price...