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

Import Errors #2

Open
em0d33 opened this issue Jan 14, 2021 · 2 comments
Open

Import Errors #2

em0d33 opened this issue Jan 14, 2021 · 2 comments

Comments

@em0d33
Copy link

em0d33 commented Jan 14, 2021

Hi,

Any ideas what could be causing this error mid import?

dacite.exceptions.WrongTypeError: wrong value type for field "revenue_accounts" - should be "typing.Dict[str, dict]" instead of value "{Redacted list of YNAB payees} of type "dict"

@maroux
Copy link
Owner

maroux commented Jan 15, 2021

Looks like the cache file might have gotten corrupted .. somehow? Can you post the full stacktrace? I'm guessing its main.py:1050 but want to double check. In addition, you can try this workaround: rm .cache/firefly_data.json and retry.

@em0d33
Copy link
Author

em0d33 commented Jan 20, 2021

That fixed it, thanks. I was having other issues with silent fails and the cache never worked.

Here is another example of it if you still want to see:

Traceback (most recent call last): File "/home/em0d33/.miniconda3/bin/firefly-ynab4-importer", line 8, in <module> sys.exit(cli()) File "/home/em0d33/.miniconda3/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/em0d33/.miniconda3/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/em0d33/.miniconda3/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/em0d33/.miniconda3/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/em0d33/.miniconda3/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/em0d33/.miniconda3/lib/python3.8/site-packages/firefly_ynab4_importer/main.py", line 1516, in import_transactions importer.run(dry_run) File "/home/em0d33/.miniconda3/lib/python3.8/site-packages/firefly_ynab4_importer/main.py", line 664, in run self._load_cache() File "/home/em0d33/.miniconda3/lib/python3.8/site-packages/firefly_ynab4_importer/main.py", line 1050, in _load_cache self.firefly_data = dacite.from_dict(FireflyData, data, config=dacite.Config(strict=True)) File "/home/em0d33/.miniconda3/lib/python3.8/site-packages/dacite/core.py", line 68, in from_dict raise WrongTypeError(field_path=field.name, field_type=field.type, value=value) dacite.exceptions.WrongTypeError: wrong value type for field "expense_accounts" - should be "typing.Dict[str, dict]" instead of value "{'Woolworths': '5097'}" of type "dict"

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

2 participants