gerwin3 / revolut-to-mt940

Convert Revolut CSV-export to MT940-file that is compatible with SnelStart.
MIT License
44 stars 27 forks source link

Permission Error #6

Closed Dcdoc88 closed 1 year ago

Dcdoc88 commented 1 year ago

Hello,

thanks for code. After solving the issues with the changing headers, Ive runned into something else.

I get the following error:

Traceback (most recent call last): File "C:\Users\Daniel\Desktop\revolut-to-mt940-master\main.py", line 40, in main() File "C:\Users\Daniel\Desktop\revolut-to-mt940-master\main.py", line 31, in main with Mt940Writer(args.output_file, args.account_iban) as writer: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Daniel\Desktop\revolut-to-mt940-master\mt940.py", line 12, in init self.file = open(filename, 'w') ^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied: 'D:\output'

Output is a folder

Cheers

gerwin3 commented 1 year ago

You probably do not have write access to that drive. Write to a file somewhere with write permissions.

Dcdoc88 commented 1 year ago

I´ve tried with all my drives and using administrator priviledges.

Does the output have to be a file or a path/folder?

gerwin3 commented 1 year ago

It has to be a file. And it must not exist yet. I think on Windows a default user only has write access to home folder i.e. C:/Users/<User>/

Dcdoc88 commented 1 year ago

Ive created a txt File, the code runs and fills the file with a couple of lines but then stops and then get the following errors:

line 86, in _parse_transaction _0, _1, completed_date_str, completed_time_str, _4, _5, name, description, _8, _9, _10, \ ValueError: not enough values to unpack (expected 22, got 19)

I take it this has to do with the different file format from Revolut , as of now there are only 19 arguments in the csv, how can it be modified to fit the new ones?

If I randomly delete some value from the code to get to 19 I get this error instead:

ValueError: time data '63aab067-1411-abbe-8580-dc8e86a44da1TRANSFER' does not match format '%Y-%m-%d%H:%M:%S'

gerwin3 commented 1 year ago

see this PR on some guidance on how to properly change the format: #3