Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect linebreaks sent by bank #65

Closed
marcelb98 opened this issue Dec 21, 2018 · 2 comments
Closed

incorrect linebreaks sent by bank #65

marcelb98 opened this issue Dec 21, 2018 · 2 comments

Comments

@marcelb98
Copy link

When fetching transactions with the python-fints library the mt940 parser crashes because there are some non-valid line breaks in the MT940 sent by our bank (Ostsächsiche Sparkasse Dresden).

We found the following two types of superfluous line breaks:

  1. Line break in a line starting with the :61: tag:
:61:1811261126CR
30,00N062NONREF
  1. Line break in the :86: tag:
:
86:166?00GUTSCHR. UEBERWEISUNG?081542?20SVWZ+Test

I know that this isn't an issue of this library. But since contacting our bank resulted in a reference to their banking software and the information that third-party products are not supported, it might be the best solution to accept those line breaks. Maybe also other Sparkassen are affected.

@wolph
Copy link
Owner

wolph commented Jan 3, 2019

As long as it doesn't break the parsing for other banks I'm not opposed to a fix for this. But I do wonder where these newlines can occur. Is it always before the amount with the :61 tag?

As for the newline within the tag... that's a really strange one if you ask me. They most have some really broken software over there :P

Either way, I've attempted to create a fix that doesn't break anything else. Can you test if it works?

@marcelb98
Copy link
Author

There are not so many transactions which contain these line breaks (I've found 5 in 464 transactions).
But if there's a :61: tag containing a superfluous line break it is every time before the amount.

I've tested the broken transactions with the current develop-branch and it's working fine. Thanks 👍

@wolph wolph closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants