cantino / reckon

Flexibly import bank account CSV files into Ledger for command-line accounting
http://blog.andrewcantino.com/blog/2013/02/16/command-line-accounting-with-ledger-and-reckon/
MIT License
414 stars 46 forks source link

Is reckon failing to handle comments when learning? #87

Closed hoclun-rigsep closed 4 years ago

hoclun-rigsep commented 4 years ago

Warning: unparsable entry due to more than one missing money value. [{:name=>"Expenses:Food", :amount=>8.96}, {:name=>"Liabilities:Amex", :amount=>-8.96}, {:name=>"# END FINANCE SCRIPT OUTPUT Sun 02 Feb 2020 12:31:14 PM EST", :amount=>-0.0}, {:name=>"# FINANCE SCRIPT OUTPUT Sun 01 Mar 2020 07:18:00 AM EST", :amount=>-0.0}]

I have comments in my ledger files like

# END FINANCE SCRIPT OUTPUT Sun 02 Feb 2020 12:31:14 PM EST

and in previous versions I didn't have any problems but now when learning from such a file I get a bunch of warnings, and the guesses for accounts sometimes contain text from theses comments.

benprew commented 4 years ago

That's definitely a bug, I'll get a fix pushed out shortly.

benprew commented 4 years ago

v0.5.3 pushed, let me know if that doesn't fix the bug and we can reopen this issue.

Thanks

hoclun-rigsep commented 4 years ago

Looks fixed; thanks for such a rapid fix.

benprew commented 4 years ago

Cool, glad it's working. Let me know if you run into any more issues and thanks again for the bug reports.

On Sat, May 2, 2020 at 4:51 PM hoclun-rigsep notifications@github.com wrote:

Looks fixed; thanks for such a rapid fix.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/cantino/reckon/issues/87#issuecomment-623030731, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAJHV4B5CSFB6OFZSFYYDLRPSWYTANCNFSM4MXDDGSQ .

hoclun-rigsep commented 4 years ago

I may have been too hasty. I have tried to do a better job isolating and duplicating:

2020-03-22      SHOPRITE WARWICK S1; Groceries; Sale
        Expenses:Groceries                                      $71.90
        Liabilities:ChaseSapphire                                       -$71.90

2020-03-25      GOOGLE Google Fi; Bills & Utilities; Sale
        Expenses:Utilities                                      $31.14
        Liabilities:ChaseSapphire                                       -$31.14

2020-03-27      AMZN Mktp USX999H3203; Shopping; Sale
        Expenses:Household                                      $82.77
        Liabilities:ChaseSapphire                                       -$82.77

      # END FINANCE SCRIPT OUTPUT Thu 02 Apr 2020 12:05:54 PM EDT

      # FINANCE SCRIPT OUTPUT Fri 01 May 2020 09:08:51 AM EDT

2020-04-03      CVS/PHARMACY 03154; Health & Wellness; Sale
        Expenses:Groceries                                      $44.41
        Liabilities:ChaseSapphire                                       -$44.41

2020-04-03      Payment Thank You - Web; Payment
        Liabilities:ChaseSapphire                                        $4969.58
        Assets:HSBC                                      -$4969.58

2020-04-08      SQ BIEN CUIT; Food & Drink; Sale
        Expenses:Food                                   $3.22
        Liabilities:ChaseSapphire                                       -$3.22

Hopefully this constitutes valid journal format and I'm not wasting your time. Obviously it parses fine in hledger or otherwise I'd really be wasting your time.

Here's the output from reckon learning from the above

What is the account name of this bank account in Ledger? |Assets:Bank:Checking| Assets
Using column 6 as the money column.  Use --money-colum to specify a different one.
Warning: unparsable entry due to more than one missing money value.
[{:name=>"Expenses:Household", :amount=>82.77}, {:name=>"Liabilities:ChaseSapphire", :amount=>-82.77}, {:name=>"# END FINANCE SCRIPT OUTPUT Thu 02 Apr 2020 12:05:54 PM EDT", :amount=>-0.0}, {:name=>"# FINANCE SCRIPT OUTPUT Fri 01 May 2020 09:08:51 AM EDT", :amount=>-0.0}]

W, [2020-06-01T08:09:40.239408 #26065]  WARN -- : Skipping row: 'Transaction Date, Post Date, Description, Category, Type, Amount' that doesn't have a valid date
+------------+----------+--------------------------------------+
| 2020-05-01 | -$500.36 | 04/30/2020; BOND VET; Personal; Sale |
+------------+----------+--------------------------------------+
To which account did this money go? ([account]/[q]uit/[s]kip) |Expenses:Groceries| 
benprew commented 4 years ago

@hoclun-rigsep, thanks for posting this, I understand now, I was testing against ledger, not hledger. I'll do some testing against that and work on a fix.

Thanks!

hoclun-rigsep commented 4 years ago

Let me know what I can do.

benprew commented 4 years ago

Ok, should be fixed in v0.5.4, give it a try and let me know

hoclun-rigsep commented 4 years ago

Looks good. Thank you, Ben.