Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fava is incompatible with beanquery #1824

Open
Tracked by #1860
zacchiro opened this issue Jun 10, 2024 · 1 comment
Open
Tracked by #1860

Fava is incompatible with beanquery #1824

zacchiro opened this issue Jun 10, 2024 · 1 comment

Comments

@zacchiro
Copy link
Contributor

I'm using Beancount 2.3.5 with Fava 1.25.1 and Beanquery 0.1.dev0 (commit b8c2ddd3105f3e15a8651bd74faa0097fe1e37d3).
My queries work fine on the Beanquery CLI and REPL, but many of them fail in various ways when used within the Fava UI.
A few examples follow.

This query:

  SELECT sum(position) AS expenses, any_meta('trip') AS trip
  WHERE account ~ '^Expenses'
  AND NOT account ~ 'Cash'
  GROUP BY any_meta('trip')
  ORDER BY any_meta('trip')

fails with:

Traceback (most recent call last):
  File "/usr/lib/python3.11/cmd.py", line 214, in onecmd
    func = getattr(self, 'do_' + cmd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'QueryShell' object has no attribute 'do_SELECT'

This query:

SELECT account, any_meta('creditor') AS creditor, sum(position) AS amount
WHERE account ~ '^Liabilities:Payables'
AND any_meta('creditor') IS NOT NULL
GROUP BY account, creditor
HAVING NOT empty(sum(position))
ORDER BY creditor, account

fails with:

ERROR: Syntax error near 'is' (at 143)

I understand that, in a general sense, this is due to the Beancount v2/v3 split, but I haven't explored the problem deeper than this. I'd like to understand if there is a plan to fix this incompatibility and how contributors can help.

cc: @dnicolodi (Beanquery maintainer)

@yagebu
Copy link
Member

yagebu commented Sep 16, 2024

See #1860 for a PR that switches Fava to use beanquery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants