mlaitinen / ofxstatement-revolut Goto Github PK
View Code? Open in Web Editor NEWofxstatement plugin for parsing Revolut CSV bank statements
License: GNU General Public License v3.0
ofxstatement plugin for parsing Revolut CSV bank statements
License: GNU General Public License v3.0
Hello,
I'm trying to use the revolut plugin on my statement.
First of all in edited the ofxstatement config file in order to modify the format date to '%%d %%b. %%Y'
Then i modified the header of the csv statement file (when it is translated in english, it complies with the May 2018 signature in .../plugins/revolut.py).
Here is the content of my config file:
[revolut]
plugin = revolut
date_format = %%d %%b. %%Y
account = revolut_account
currency = EUR
Then when i execute the code i have the following exception:
$ ofxstatement convert -t revolut testfile.csv res.csv
Traceback (most recent call last):
File "/donnees/informatique/anaconda/bin/ofxstatement", line 8, in <module>
sys.exit(run())
File "/donnees/informatique/anaconda/lib/python3.7/site-packages/ofxstatement/tool.py", line 195, in run
return args.func(args)
File "/donnees/informatique/anaconda/lib/python3.7/site-packages/ofxstatement/tool.py", line 166, in convert
statement = parser.parse()
File "/donnees/informatique/anaconda/lib/python3.7/site-packages/ofxstatement/parser.py", line 49, in parse
stmt_line.assert_valid()
File "/donnees/informatique/anaconda/lib/python3.7/site-packages/ofxstatement/statement.py", line 158, in assert_valid
assert self.id or self.check_no or self.refnum
AssertionError
Here is the content of testfile.csv:
Completed Date ; Description ; Paid Out (EUR) ; Paid In (EUR) ; Exchange Out; Exchange In; Balance (EUR); Category; Notes
08 nov. 2020 ; Rayon Bio 4894386 ; 1,77 ; ; ; ; 1 270,39; Courses;
7 nov. 2020 ; Grand Frais ; 29,18 ; ; ; ; 1 272,16; Courses;
7 nov. 2020 ; Art Prog ; 20,75 ; ; ; ; 1 301,34; Services;
I use ofxstatement 0.7.1
Hope this help. This plugin may be so usefull for many people who want to use gnucash-like softwares with their revolut files.
Thx :)
ofxstatement-revolut
doesn't work with ofxstatement
version 0.6.5
because of this line: kedder/ofxstatement@e536af2#diff-767580eeecc70064922b1880b8ddaf7bR152
None of those fields are set.
Workaround: use ofxstatement
version 0.6.4
.
This may have happened on some balance migration events, where there's no balance value, and we crash with:
Traceback (most recent call last):
File "/home/marco/.local/bin/ofxstatement", line 8, in <module>
sys.exit(run())
File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/tool.py", line 205, in run
return args.func(args)
File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/tool.py", line 176, in convert
statement = parser.parse()
File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/plugins/revolut.py", line 69, in parse
statement = super().parse()
File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/parser.py", line 46, in parse
stmt_line = self.parse_record(line)
File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/plugins/revolut.py", line 61, in parse_record
balance = self.parse_float(line[c["Balance"]])
File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/parser.py", line 77, in parse_float
return self.parse_decimal(value)
File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/parser.py", line 81, in parse_decimal
return D(value.replace(",", ".").replace(" ", ""))
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]
csv triggering this:
TRANSFER,Current,2020-11-13 03:44:18,2020-11-13 03:44:18,Balance migration to another region or legal entity,-123.45,0.00,EUR,COMPLETED,
TRANSFER,Current,2020-11-13 03:44:18,2020-11-13 03:44:18,Balance migration to another region or legal entity,123.45,0.00,EUR,COMPLETED,
Hi,
Arch Linux:
error: failed to commit transaction (conflicting files)
ofxstatement-revolut-git: /usr/lib/python3.9/site-packages/ofxstatement/tests/samples/config.ini exists in filesystem (owned by ofxstatement)
Errors occurred, no packages were upgraded.
It would be better to rename your config.ini
to whatever else to avoid the conflict.
When installing ofxstatement-revolut package older version is selected.
~/> pip3 install ofxstatement-revolut==2.0.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement ofxstatement-revolut==2.0.0 (from versions: 1.2.0, 1.3.1, 1.4.0, 1.6.0)
ERROR: No matching distribution found for ofxstatement-revolut==2.0.0
Version 2.0.0 of this package is published as .egg and it is not supported by pip. installation_log.txt
Here is a discussion on similar problem: [link](https://stackoverflow.com/questions/41757965/pip-installs-old-version-of-package
Revolut has changed the CSV limiter from ;
to ,
which causes problems on lines like this:
Mar 12, 2021 , Rimi , 28.22 , , , , 1,513.52, Groceries,
There's some discussion about this issue on the Revolut Community forums:
https://community.revolut.com/t/statement-export-csv-date-formatting/75661/15
https://community.revolut.com/t/statements-in-excel-csv-format-errors/8655/8
Hi,
the class RevolutCSVStatementParser(CsvStatementParser):
sets date_format = "%b %d, %Y"
.
This might be somewhat dependent on OS language settings and language variants Revolut app supports:
English / UK: 18 May 2018
Deutsch / Deutschland: 18.05.2018
Czech: May 18, 2018 (obviously not Czech, but rather English US style).
Any ideas how to deal with that? A dictionary to allow user set his own format?
My CSV exports from Revolut contain multiple accounts in the same file (e.g. stocks and current account). What if we added support a setting to filter the transactions by the "Product" column, so that multiple OFX files can be generated from the same CSV?
See also kedder/ofxstatement#47
Hi,
Any chance to set parser.statement.currency as per currency code in the header line of the CSV file Paid Out (CCY)?
That would limit the configuration to a single entry for all the currencies Revolut supports.
P.S. And the signature matching would have to be more general.
Hey there!
I'm not super well versed in how the Pip registry works, but trying to just pip install ofxstatement-revolut
doesn't do it for me, and it feels like it should. I'm currently using a workaround by pulling straight from Github (example of that), but I'd like to be able to just do the pip command route.
Could you please upload the package to the appropriate registries?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.