Giter VIP home page Giter VIP logo

Comments (14)

nocalla avatar nocalla commented on May 20, 2024

Might need to revert the UTF-8 encoding on read in line 26.

from bank2ynab.

torbengb avatar torbengb commented on May 20, 2024

Nope; I just changed it back to config.read(conf_files) but got the same error still.

from bank2ynab.

nocalla avatar nocalla commented on May 20, 2024

Try changing the encoding to latin-1. Link

from bank2ynab.

torbengb avatar torbengb commented on May 20, 2024

You mean encoding the downloaded file in Latin-1? It's a good test case. I'll check and report back.

This leads me to realize another question: Can we make the script either encoding-agnostic, or auto-detect the encoding and then either handle it accordingly or even convert the input file?

from bank2ynab.

nocalla avatar nocalla commented on May 20, 2024

from bank2ynab.

torbengb avatar torbengb commented on May 20, 2024

Change UTF-8 to latin-1 in line 26.
D'oh! :-) that's what you meant, sorry for misunderstanding. I'll test it at home.

from bank2ynab.

nocalla avatar nocalla commented on May 20, 2024

I tried running the UTF-8 version with ááááééééáá and had no problem with it.

from bank2ynab.

torbengb avatar torbengb commented on May 20, 2024

I'll have a go at it tonight and report back.

from bank2ynab.

torbengb avatar torbengb commented on May 20, 2024

Very odd! I get the above error regardless whether I have:
config.read(conf_files, encoding = "latin-1") or
config.read(conf_files, encoding = "utf-8")
I'm testing with your ááááééééáá and my üöäÜÖÄßæøåÆØÅ in separate and otherwise good test cases, see attached. I'm at a loss here.

elbi_umsaetze_20171018220326.csv.txt

from bank2ynab.

nocalla avatar nocalla commented on May 20, 2024

What happens if you remove the encoding bit from the function altogether?

from bank2ynab.

nocalla avatar nocalla commented on May 20, 2024

I'm curious to see if you still get this issue now after resolving issue #29.

from bank2ynab.

torbengb avatar torbengb commented on May 20, 2024

Sorry @nocalla but I still get errors when run with Python 2:

('Parsing file: ', 'elbi_umsaetze_20171022210838.csv')
('Using format: ', u'AT Raiffeisen Bank')
Traceback (most recent call last):
  File "bank2ynab.py", line 171, in <module>
    main()
  File "bank2ynab.py", line 163, in main
    output = clean_data(file)
  File "bank2ynab.py", line 71, in clean_data
    transaction_reader = csv.reader(transaction_file, delimiter = delim)
TypeError: "delimiter" must be string, not unicode

This is a different error than this one from the pull request.

It works with Python 3!

from bank2ynab.

nocalla avatar nocalla commented on May 20, 2024

Okay great! That's the python 2 failure we're getting for delimiters. It's a separate issue to the umlauts so this issue is resolved?

from bank2ynab.

torbengb avatar torbengb commented on May 20, 2024

If you say so then yes it's resolved! :-) I guess I can close it then.

from bank2ynab.

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.