I'm a long-time Ledger user but new to beancount.  I moved, because I think 
I see functionality I can use right now (so thanks!).

I'm starting by trying to handle some investments, and I'm stuck on a 
seemingly simple transaction that gets the above error.  

The goal:


   - Open a few accounts for a stock.  In this case, I have an account of 
   certificated shares and an account of book-entry shares at a broker.
   - Acquire shares as certificates, and then move them to book entry.

The code (excerpted and cleaned*)

1970-01-01 open Assets:Certs:AAPL
1970-01-01 open Assets:MYBroker:AAPL

1983-01-05 * "A Note"
    Assets:Certs:AAPL        20 AAPL {34.31 USD, 1983-01-05}
    Assets:Cash:Basis

1983-04-05 * "A Note"
    Assets:Certs:AAPL        18 AAPL {47.57 USD, 1983-04-05}
    Assets:Cash:Basis

1983-05-10 * "stock move"
    Assets:MYBroker:AAPL           20 AAPL {1983-01-05}
    Assets:MYBroker:AAPL           18 AAPL {1983-04-05}
    Assets:Certs:AAPL          -20 AAPL {1983-01-05}
    Assets:Certs:AAPL          -18 AAPL {1983-04-05}

; zero local shares now
1983-05-11 balance Assets:Certs:AAPL 0 AAPL 



If I run bean-report filename print on that (real) file, i get 
"beancount:84:      Failed to categorize posting 1", where 84 points to the 
first leg of the "stock move" transaction.  I also get the same error on 
line 85, the second leg.  If I swap the first two legs with the second two, 
the error follows the "MBroker" legs.

The subsequent balance assertion obviously fails.

Any tips?  It's probably obvious, but I can't see it.


Thanks,

Bill

* Has anyone ever made a routine to "clean"--remove PII--from a beancount 
file?  I don't really want to share my financial information, but I know 
it's often useful to share actual data files.  It would be nice to have a 
script that could take entries such as Assets:Certificate:AAPL and turn 
turn it into something like Assets:LevelA1:LevelB1 or the like.
  

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/9c9dcc5f-72bf-44b2-aaf9-4e0c07cbff77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to