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
415 stars 46 forks source link

reckon fails any csv with Date::Error #121

Closed mikaeljagelid closed 1 year ago

mikaeljagelid commented 1 year ago

I'm just trying out reckon for beancount but can't get it to parse any csv I try. I always get the error:

/Users/.../.gem/ruby/2.6.0/gems/reckon-0.9.1/lib/reckon/date_column.rb:76:in `rescue in likelihood': uninitialized constant Date::Error (NameError)

I've tried csv from my banks and example csv files for beancount-import with arguments for skipping header rows, the correct date column, encoding, etc but every file fails in the same way.

benprew commented 1 year ago

Hi @mikaeljagelid thanks for reporting this error. I'm testing out a fix now, I'll update this issue when it's available for testing.

benprew commented 1 year ago

@mikaeljagelid This appears to be a ruby 2.6.0 issue, it doesn't occur on 2.7+.

I'm currently testing on 2.7, 3.0 and 3.1. For my curiosity, what OS are you running? I'll add 2.6.0 to the list of rubies to test, but I'd like to know where that's coming from.

Thanks!

benprew commented 1 year ago

@mikaeljagelid , I've released Reckon 0.9.2 which should fix this error https://github.com/cantino/reckon/releases/tag/v0.9.2

Give it a try and if it doesn't fix it, reopen this issue.

Thanks!