Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path problems #21

Open
tim-rohrer opened this issue Jan 8, 2023 · 0 comments
Open

Path problems #21

tim-rohrer opened this issue Jan 8, 2023 · 0 comments

Comments

@tim-rohrer
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant