Code Monkey home page Code Monkey logo

Comments (4)

wolph avatar wolph commented on July 30, 2024 1

Hrm... I forgot that you actually need to escape the # in this case. I suppose the easiest way would be a manual checkout followed by a pip install -e directory
Next time I'll omit the # :)

I'll take a look at the modified output soon, the mt940 parsing is a bit fragile due to all the (partially) incorrect implementations around

from mt940.

wolph avatar wolph commented on July 30, 2024 1

Took a bit of time to investigate further, but I found the problem. This example uses extra (non-swift, indicated by :NS: data) which wasn't supported yet.

Since the entire code assumes that all tags are always numeric, this was a bit of an issue but I believe it will work correctly now :)

from mt940.

wolph avatar wolph commented on July 30, 2024

Hi @raphaelm

Sorry for breaking the code in your case. Apparently there's another implementation of the MT940 standard I wasn't aware of. Can you test if the hotfix/#23 branch solves your problem?
https://github.com/WoLpH/mt940/tree/hotfix/%2323

from mt940.

raphaelm avatar raphaelm commented on July 30, 2024

Hi,

no worries, as I said thats only an example I use for testing, no real users harmed. Thanks for maintaining this high-quality library!

Yes, your fix removes the exception. Thank you! Just so you now, the output differs slightly from 3.8:

{'customer_reference': '68790452', 'transaction_reference': 'STARTUMS', 'id': 'S051', 'funds_code': 'M', 'currency': 'DEM', 'entry_date': Date(2002, 3, 20), 'extra_details': ':NS:01Verwendungszweck 1', 'bank_reference': None, 'status': 'C', 'amount': <5000.00 DEM>, 'date': Date(2002, 3, 17)}
...
{'customer_reference': '', 'transaction_reference': 'STARTUMS', 'funds_code': 'M', 'currency': 'DEM', 'id': 'S051', 'extra_details': ':NS:01bekannt', 'bank_reference': None, 'status': 'D', 'amount': <-50000.00 DEM>, 'date': Date(2002, 3, 24)}

In 3.8 the extra_details fields have been empty, but that is totally okay to me.

On a side node, it is surprisingly hard to pip install from a git branch that includes a / and a # ;)

from mt940.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.