nielsmaerten/ynab-buddy

Parser fails when there are multiple 'inflow' columns

Closed this issue · 3 comments

From discussion #42:
The app is now giving me another error…

Unable to parse ''.
The expected date format was: 'dd/MM/yyyy'.
You may want to check the format in your config.yaml file.

The config.yaml is set like this:

[…]
header_rows: 10
footer_rows: 3
delimiter: ","
columns: [skip, skip, date, payee, inflow, inflow, skip]
date_format: dd/MM/yyyy
decimal_separator: "."
thousand_separator: ""
[…]

And the CSV is like this (added some xxxx for privacy reasons):

[…]
,Data contabile,Data valuta,Tipologia,Entrate,Uscite,Divisa
,,30/08/2022,POS-xxxxxxx,,-7.00,EUR
,,30/08/2022,POS-xxxxxxx,,-33.29,EUR
,,30/08/2022,POS-xxxxxxx,,-3.00,EUR
,,30/08/2022,POS-xxxxxxx,,-24.00,EUR
,01/09/2022,01/09/2022,Disposizione - RIF:xxxxxxx,,-180.00,EUR
,01/09/2022,31/08/2022,Addebito canone -xxxxxxx,,-1.00,EUR
[…]

Any clue? Should open a new issue?

Thanks again!
Bruno A. De Santis

@justalittle-BIT
Hi Bruno,

So I got back from my vacation 😎, and had some time to look into your issue.
Turns out that having multiple 'inflow' columns might indeed be the problem.

I have again created a preview release that should now be able to handle your CSV files correctly.
Let me know if it works! :)

Greets,
Niels

Great! I'll merge the PR and get this rolled out to the main release then.

One question: do you think it would be feasible to make it crunch also xlsx files?

I do believe that's theoretically possible, but it's not something I have time to tackle right now. XLSX files can be tricky to parse because they can have multiple sheets, markup such as bold and italic text, macros, ...

Also AFAIK, there aren't many banks that offer transactions as an xlsx file, while not also offering csv. So it seems a little out of scope for ynab-buddy.

But hey, if you or anyone reading this wants to take a swing at it: go ahead and click that fork button :)