Okay, I was finally able to run bean-check without any errors. I will write 
down things I did in hopes that it will help someone else. I wouldn't have 
been able to do with without folks on the IRC channel, they were really 
helpful. 

The gnucash-to-beancount script opens all the accounts at the beginning of 
the file but on some accounts the dates are later then some of the 
transactions in the file, which produces the inactive account error. I 
changed the dates for the opening statements to when the earliest 
transaction was for that account. Then basically iterate this for the rest 
of the accounts with the same error.

Another big problem was that fact that I had a lot of account names that 
are valid in gnucash which aren't valid in beancount.
  * Accounts starting with lowercase
  * Accounts starting with numbers
  * Accounts with & in their name (e.g., Expenses:Gas-&-Electric)
  * Accounts with apostrophes


On Wednesday, August 30, 2017 at 9:31:16 AM UTC-7, melb...@gmail.com wrote:
>
> For what it's worth I have also tried gnucash2ledger and then 
> ledger2beancount, but I get similar errors.
>
> On Wednesday, August 30, 2017 at 9:26:08 AM UTC-7, melb...@gmail.com 
> wrote:
>>
>> I'd love to try beancount but I seem to be stuck trying to convert my 
>> data from gnucash. I am using 
>> https://github.com/debanjum/gnucash-to-beancount to convert 4 years of 
>> gnucash data. When I run bean-check on the result file, I get a ton of 
>> errors that look like 
>>
>> /home/user1/beancount/foo.beancount:4505:    Invalid token: 'taxed'
>> /home/user1/beancount/foo.beancount:4517:    syntax error, unexpected COLON, 
>> expecting EOL or COMMENT or ATAT or AT
>> /home/user1/beancount/foo.beancount:4517:    Invalid token: 'k'
>> /home/user1/beancount/foo.beancount:4522:    Invalid token: 'taxed'
>> /home/user1/beancount/foo.beancount:4532:    syntax error, unexpected COLON, 
>> expecting EOL or COMMENT or ATAT or AT
>> /home/user1/beancount/foo.beancount:4532:    Invalid token: 'k'
>> /home/user1/beancount/foo.beancount:4537:    Invalid token: 'taxed'
>> /home/user1/beancount/foo.beancount:4547:    syntax error, unexpected COLON, 
>> expecting EOL or COMMENT or ATAT or AT
>> /home/user1/beancount/foo.beancount:4547:    Invalid token: 'k'
>> /home/user1/beancount/foo.beancount:4552:    Invalid token: 'taxed'
>> /home/user1/beancount/foo.beancount:4566:    syntax error, unexpected COLON, 
>> expecting EOL or COMMENT or ATAT or AT
>> /home/user1/beancount/foo.beancount:4566:    Invalid token: 'k'
>> /home/user1/beancount/foo.beancount:4571:    Invalid token: 'taxed'
>> /home/user1/beancount/foo.beancount:4581:    syntax error, unexpected COLON, 
>> expecting EOL or COMMENT or ATAT or AT
>> /home/user1/beancount/foo.beancount:4581:    Invalid token: 'k'
>> /home/user1/beancount/foo.beancount:4586:    Invalid token: 'taxed'
>>
>>
>> followed by a ton of results like this
>>
>> /home/user1/beancount/foo.beancount:1168:    Invalid reference to 
>> inactive account 'Expenses:House:Appliances-and-Furniture'
>>
>>    2014-011-06 * "AMAZON.COM          AMZN.COM/BI - Vornado fan"
>>      notes: "OFX ext. info: |Trans type:Generic debit|Memo:FOOBAR 
>> MERCHANDISE"
>>      num: "12345023456233"
>>      Liabilities:American-Express             -107.760 USD
>>        memo: "FOOBAR MERCHANDISE"
>>      Expenses:House:Appliances-and-Furniture   107.760 USD
>>
>>

-- 
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/fa929358-330c-4085-a3cf-9719be0e816b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to