Closed abesto closed 8 years ago
I checked it out locally and I think tests fail for compatibility, which version does this work on ? I get a TypeError: decoding str is not supported on python 3.4 at the [unicode(cell, 'utf-8') for cell in row] line ?
Oh, I see; I only tested with python 2.7. Let me see if I can make it work on both versions...
Side-note: when I try to run tests, I get this failure:
======================================================================
ERROR: test_duplicate (test_csvimport.TestCsv)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/abesto/playground/otp2ynab/virtualenv/src/nynabapi-abesto/tests/test_csvimport.py", line 40, in test_duplicate
with open(args.csvfile, mode='w') as f:
IOError: [Errno 2] No such file or directory: 'data/test.csv'
Well, open(args.csvfile, mode='w')
should create the file if it does not exist, but in that case it might be that data directory that does not exist. Ah, it's not been committed, of course. I'll add code to create the data dir
Thanks abesto, I've cherry picked all these commits by now I think
Indeed. Thanks for all the hard work! Let me know if I can help more; I'm building my home finance automation on your work, would love to contribute back.
First of all: thank you so much for building this. With YNAB4 I had a script that transformed the CSV exports of my bank into CSV that YNAB4 could eat; with your tool now, I can just feed that directly to YNAB5.
This PR contains minor fixes for the
csvimport.py
script.