New issue 157: bean-web crashes on prices that are zero.
https://bitbucket.org/blais/beancount/issues/157/bean-web-crashes-on-prices-that-are-zero

Andrew Stein:

I have some prices that are zero in the beancount file. For example:
```
2011-09-14 price MCMXX                                 0 MCMXX
```

`bean-web` crashes when processing these.

This is the stack trace
```
Traceback (most recent call last):
  File "/usr/local/bin/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/usr/local/bin/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File 
"/usr/local/lib/python3.6/site-packages/beancount-2.0b13-py3.6-macosx-10.12-x86_64.egg/beancount/web/web.py",
 line 1030, in wrapper
    app.price_map = prices.build_price_map(entries)
  File 
"/usr/local/lib/python3.6/site-packages/beancount-2.0b13-py3.6-macosx-10.12-x86_64.egg/beancount/ops/prices.py",
 line 116, in build_price_map
    for (date, rate) in remove_list]
  File 
"/usr/local/lib/python3.6/site-packages/beancount-2.0b13-py3.6-macosx-10.12-x86_64.egg/beancount/ops/prices.py",
 line 116, in <listcomp>
    for (date, rate) in remove_list]
decimal.DivisionByZero: [<class 'decimal.DivisionByZero'>]
127.0.0.1 - - [29/Jan/2017 16:43:05] "GET / HTTP/1.1" 500 741
```


-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/20170129230107.17601.37857%40celery-worker-107.ash1.bb-inf.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to