krachtstefan / moneymoney2ynab

MoneyMoney Extension to export a OFX file that is optimized to work for YNAB import
22 stars 1 forks source link

STMTTRN.name too long #4

Closed chbndrhnns closed 4 years ago

chbndrhnns commented 4 years ago

The tool I use to process the OFX files complains like this:

ValueError: Can't set OFX.bankmsgsrsv1 to <Element 'BANKMSGSRSV1' at 0x104826830>: 
Can't set STMTTRNRS.stmtrs to <Element 'STMTRS' at 0x104826cb0>: 
Can't set STMTRS.banktranlist to <Element 'BANKTRANLIST' at 0x104826e90>: 
Can't set STMTTRN.name to PayPal (Europe) S.a.r.l. et Cie., S.C.A.: 'PayPal (Europe) S.a.r.l. et Cie., S.C.A.' is too long; max length=32

Would you be able to fix that?

krachtstefan commented 4 years ago

Can you give me a little bit more context to reproduce this error?

The tool I use to process the OFX

Which tool do you mean? Shouldn't there just be MoneyMoney and YNAB?

chbndrhnns commented 4 years ago

Sure. I parse the OFX files using ofxtools and then I send them to YNAB using a small Python application. While YNAB seems not to care about OFX specs, ofxtools does. And there is a character limit on the STMTTRN.name field

krachtstefan commented 4 years ago

I think a 32 character limitation in this plugin would unnecessary cut off some names after the MoneyMoney export which might also lead to breaking existing YNAB matchings.

So I guess you could either

hope this helps

chbndrhnns commented 4 years ago

I understand that and will probably go ahead with a fork. I also agree with your thought that this limit unreasonable.

However, MoneyMoney conforms to OFX here if you export OFX without your plugin. Technically speaking, it's not OFX-compliant what your plugin writes.