Code Monkey home page Code Monkey logo

Comments (5)

wolph avatar wolph commented on August 14, 2024

The file doesn't appear to have an intermediate_opening_balance, only an opening_balance (the :60F:: https://mt940.readthedocs.io/en/latest/mt940.tags.html#module-mt940.tags

The account identification data is across the entire file so that's in the transactions (plural) object, not in a singular transaction.

from mt940.

phamthangpri avatar phamthangpri commented on August 14, 2024

but sometimes, it can not retrieve the account_identification in the entire file, all account_identification values in transactions are null.

from mt940.

wolph avatar wolph commented on August 14, 2024

That is very odd, that should only happen if it either doesn't detect the field at all or if something is overwriting it. Do you have any (anonymised) files you can send to test?

from mt940.

phamthangpri avatar phamthangpri commented on August 14, 2024

Hi,
Yes,
Here is an example but didn't check if all account identifications are detected. I'm on holiday now. If this file works, I send you another one after my holiday.
https://docs.google.com/document/d/1K73rB2Yu2JRWTuy1k0oEtqS-em98px0O9NgEW5AcaXs/edit?usp=drivesdk

But yesterday, I read 7000 files and it didn't work very well. Just 30% of account identifications were detected. Finally, I needed to dev by myself to read the account identification.

Thanks

from mt940.

wolph avatar wolph commented on August 14, 2024

I've done a bit of research and as far as I can see it's properly parsing the account identifications without issues. But... the account identification is in the transactions object and not the transaction itself.

To illustrate:

transactions = mt940.parse('test.mt940')

for transaction in transactions:
    print(transactions.data['account_identification'], transaction)

With the loglevel set to debug you can see what it is and is not parsing but that gets very verbose. But it does show the account_identification for me in these cases. Perhaps you can share some other testdata where it fails?

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.