New issue 242: unorderable types: NoneType() < datetime.date() / 'BQLShell' 
object has no attribute 'do_SELECT'
https://bitbucket.org/blais/beancount/issues/242/unorderable-types-nonetype-datetimedate

Martin Michlmayr:

I forgot to convert something from ledger's XX @@ FOO to XX {FOO} syntax and 
got the following error in bean-query.  (I originally found the problem because 
fava crashed. Below is a simplified query.)

```
beancount> SELECT account WHERE account_sortkey(account) ~ "^[01]" GROUP BY 
account, cost_date, currency, account_sortkey(account) ORDER BY 
account_sortkey(account), cost_date
Traceback (most recent call last):
  File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
    func = getattr(self, 'do_' + cmd)
AttributeError: 'BQLShell' object has no attribute 'do_SELECT'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tbm/.local/lib/python3.5/site-packages/beancount/query/shell.py", 
line 266, in run_parser
    self.dispatch(statement)
  File "/home/tbm/.local/lib/python3.5/site-packages/beancount/query/shell.py", 
line 246, in dispatch
    return method(statement)
  File "/home/tbm/.local/lib/python3.5/site-packages/beancount/query/shell.py", 
line 414, in on_Select
    self.options_map)
  File 
"/home/tbm/.local/lib/python3.5/site-packages/beancount/query/query_execute.py",
 line 328, in execute_query
    reverse=(query.ordering == 'DESC'))
TypeError: unorderable types: NoneType() < datetime.date()
beancount> 
```

Test case:

```
2010-01-01 open Equity:Opening-Balance
2010-01-01 open Assets:Pension:NEST

2018-01-01 * "Opening balance: NEST"
  Assets:Pension:NEST                                      57.62 GBP
  Equity:Opening-Balance

2018-01-01 * "Opening balance: NEST Higher Risk Fund"
  fund: "NESTHIGHER"
  Assets:Pension:NEST              11.7230 NESTHIGHER {{25.61 GBP, 2017-12-14}}
  Equity:Opening-Balance

2018-01-02 * "NEST: Bought NEST Higher Risk Fund with December employee 
contributions"
  fund: "NESTHIGHER"
  Assets:Pension:NEST              11.7520 NESTHIGHER @@ 25.61 GBP
  Assets:Pension:NEST                                   -25.61 GBP
```


-- 
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/20180317124301.23971.73237%40celery-worker-110.ash1.bb-inf.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to