gitviola / ynab-bank-importer

💰 Pull transactions from your bank and import them to YNAB automatically.
https://ynab.com/referral/?ref=C-_IP8eD8dWYfEec&utm_source=customer_referral
MIT License
133 stars 20 forks source link

"Wrong line format" error with fints / comdirect #43

Closed deyhle closed 5 years ago

deyhle commented 5 years ago

Importer fails with a comdirect fints account:

Traceback (most recent call last):
    15: from /usr/app/run.rb:9:in `<main>'
    14: from /usr/app/run.rb:9:in `map'
    13: from /usr/app/run.rb:11:in `block in <main>'
    12: from /usr/app/lib/account.rb:18:in `fetch_transactions'
    11: from /usr/app/lib/dumper/fints.rb:22:in `fetch_transactions'
    10: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/client.rb:79:in `get_statement'
     9: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/helper.rb:13:in `mt940_to_array'
     8: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl.rb:41:in `parse'
     7: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl.rb:41:in `collect'
     6: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl.rb:41:in `block in parse'
     5: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl.rb:41:in `new'
     4: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/statement.rb:16:in `initialize'
     3: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/statement.rb:36:in `parse!'
     2: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/statement.rb:36:in `each'
     1: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/statement.rb:42:in `block in parse!'
/usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/field.rb:51:in `parse': Wrong line format: ":              ?249,999?25FLOSSB.V.STORCH-MUL.OPP.R?26A0M430EUR 1,60?27ABR.BETRAG BRUTTO 13,07 EUR?28STEUERABZUG 2,93- EUR?29Ref. 2PF199999999992/4" (Cmxl::Field::LineFormatError)

(sensitive parts overwritten with 9s)

The transaction seems to be this one in the comdirect web interface:

bildschirmfoto 2019-01-09 um 08 35 36

Any help?

gitviola commented 5 years ago

Hey @deyhle, this seems to be a problem in the ruby_fints library.

Do you mind opening an issue over there?

There is not much that I can do about it here. I might be able to help over in the other repository if I find some time. Let's hope that @mkilling finds some time 🤞 (he's the one who wrote this awesome library that makes it possible for us to fetch the transactions from most german banks).

deyhle commented 5 years ago

Thank you, I just opened https://github.com/playtestcloud/ruby_fints/issues/6 over there.

misterfinster commented 5 years ago

I know this is closed, but this issue (at least with \r\n in the lines) also affects Deutsche Bank (i'm seeing it) all the way down in cmxl: https://github.com/railslove/cmxl/issues/30. I've manually updated ruby_fints to cmxl 1.4.0 and it is still broken. Just some notes for anyone else having this issue.