I don't know if it's related, but I've also been having trouble with -Y 
from the command line. I used to be able to show my annual (dollar) 
contributions to an investment account (multiple funds) with

  $ ledger -YBj reg Assets:Investments and @Contribution

but recently I started getting the error

  While evaluating value expression:
    quantity(scrub(display_amount))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  While converting [...] to an amount:
  While calling function 'quantity [...]':
  Error: Cannot convert a balance with multiple commodities to an amount

Again, without the -Y it works fine. Did Ledger behavior change this year?


Matthew

On Saturday, June 23, 2012 7:12:46 PM UTC-7, Matthew Harris wrote:
>
> I finally got the Python interface built, and I'm trying to see if I can 
> write code that plots expenses by month. From the command line I can do 
> 'ledger reg Expenses:Utilities -M', and Journal.query() is documented to 
> accept "every argument you can specify on the command line, include 
> --options", so I thought this would work:
>
>   ledger python
>   >>> import ledger
>   >>> journal = ledger.read_journal('finances.dat')
>   >>> [post for post in journal.query('Expenses:Utilities -M')]
>
> Unfortunately this segfaults every time. (Without the -M it works fine.) 
> Obviously the segfault is a bug, but am I using the interface correctly?
>
>
> Matthew
>

Reply via email to