-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I'm a bit of a Python noob, but I was getting this error:
08-01-2023:08:44:05, INFO [main.py:main:get_uncat_transfers:55] Function start arguments: {'path_to_rawdata': './myTest.csv', 'path_to_translationJSON': 'translations.json'}
08-01-2023:08:44:05, DEBUG [main.py:main:get_rawdata:97] Function start arguments: {'path_to_rawdata': './myTest.csv'}
08-01-2023:08:44:05, DEBUG [main.py:main:get_translation:89] Function start arguments: {'path_to_translationJSON': 'translations.json'}
Traceback (most recent call last):
File "/Users/tim/Programming/financial/csv2cash/migration.py", line 3, in <module>
get_uncat_transfers('./myTest.csv', 'translations.json')
File "/Users/tim/Programming/financial/csv2cash/csv2cash/main.py", line 58, in get_uncat_transfers
translation = get_translation(path_to_translationJSON)
File "/Users/tim/Programming/financial/csv2cash/csv2cash/main.py", line 90, in get_translation
with path_to_translationJSON.open() as translationjson:
AttributeError: 'str' object has no attribute 'open'
My research indicates that a path object wasn't created. So I've added it to:
translation = get_translation(Path(path_to_translationJSON))
and now the file opens.
Running into other errors which I'll work on as I'm trying to migrate from Quicken to GnuCash.
Are you interested in PRs?
Metadata
Metadata
Assignees
Labels
No labels