On Wed, Aug 30, 2017 at 2:05 PM, <[email protected]> wrote: > 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. >
That's great! > 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. > This would cause the second error you reported indeed. Beancount ignores the location of the directives in the file (on purpose). 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 > That's correct. I think the converter script could be modified to make reasonable account name conversions. > > > > On Wednesday, August 30, 2017 at 9:31:16 AM UTC-7, [email protected] > 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, [email protected] >> 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/gn >>> ucash-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 [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/fa929358-330c-4085-a3cf-9719be0e816b%40googlegroups.com > <https://groups.google.com/d/msgid/beancount/fa929358-330c-4085-a3cf-9719be0e816b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CAK21%2BhPUUQCC5bgq%2B6MEmcpx1Tx7zgTY3vnbvRJJv%3Dx48iVohg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
