Closed michaellammers closed 1 year ago
Please take a look at this reply I wrote earlier: https://github.com/gerwin3/revolut-to-mt940/issues/2#issuecomment-819515365
It should be quite straightforward to edit the script for your use case. PR is welcome!
Thanks! ✌️
Op ma 19 apr. 2021 om 15:45 schreef Gerwin van der Lugt < @.***>
Please take a look at this reply I wrote earlier: #2 (comment) https://github.com/gerwin3/revolut-to-mt940/issues/2#issuecomment-819515365
It should be quite straightforward to edit the script for your use case. PR is welcome!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gerwin3/revolut-to-mt940/issues/3#issuecomment-822478279, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBL6TGFUXPCHEUQC5R2R3LTJQXWJANCNFSM426BODLQ .
-- Verzonden via Gmail Mobile
Hey @gerwin3 thanks for making this repo!
I too have Revolut Business and have been playing with the code to get it functioning. My Revolut Business .csvs don't include the 'Date started (Europe/Amsterdam)', 'Date completed (Europe/Amsterdam)'
headers, so once I remove these from the EXCPECT_HEADERS
function in revolut.py and run the file, I get the following error, which indicates that it's expecting 21 columns and is now only getting 19.
File "/pathredacted/revolut-to-mt940/main.py", line 40, in <module> main() File "/pathredacted/revolut-to-mt940/main.py", line 32, in main transactions = reader.get_all_transactions() File "/pathredacted/revolut-to-mt940/revolut.py", line 65, in get_all_transactions transactions = self._parse_transaction(row) + transactions File "/pathredacted/revolut-to-mt940/revolut.py", line 83, in _parse_transaction _0, _1, completed_date_str, completed_time_str, _4, _5, name, description, _8, _9, \ ValueError: not enough values to unpack (expected 21, got 19)
I've tried adjusting the code under line 83 where the error appears, but can't get it to work. Any ideas?
_0, _1, completed_date_str, completed_time_str, _4, _5, name, description, _8, _9, \ _10, _11, _12, amount_str, fee_str, balance_str, _16, _17, _18, iban, _20 \ = row
Thank you.
What error did you get?
I got this error:
Traceback (most recent call last): File "/REDACTED/revolut-to-mt940/main.py", line 40, in <module> main() File "/REDACTED/revolut-to-mt940/main.py", line 32, in main transactions = reader.get_all_transactions() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/REDACTED/revolut-to-mt940/revolut.py", line 65, in get_all_transactions transactions = self._parse_transaction(row) + transactions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/REDACTED/revolut-to-mt940/revolut.py", line 83, in _parse_transaction _0, _1, completed_date_str, completed_time_str, _4, _5, name, description, _8, _9, \ ValueError: not enough values to unpack (expected 21, got 19)
I think the code under line 83 for _parse_transaction()
needs to be adjusted but unfortunately I'm not having any success. Any suggestions? Thanks!
The number of fields do no match, make sure you line them up correctly and remove variables that you do not have in your CSV.
Hi Erwin, bit of a noob on github. :) Thanks for making this script. Can't wait to use it with Snelstart, but my csv files seem to have yet another build.
My headers are: 'Date started (UTC)', 'Date completed (UTC)', 'ID', 'Type', 'Description', 'Reference', 'Payer', 'Card number', 'Orig currency', 'Orig amount', 'Payment currency', 'Amount', 'Fee', 'Balance', 'Account', 'Beneficiary account number', 'Beneficiary sort code or routing number', 'Beneficiary IBAN', 'Beneficiary BIC'
The export is from Revolut Business.
For now I worked around this by matching up the content from my export to the headers of used in python.py in a google spreadsheet and than download that as csv. That worked perfectly.