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

ApiValueError when trying to list accounts #18

Open
blathers123 opened this issue Aug 6, 2023 · 3 comments
Open

ApiValueError when trying to list accounts #18

blathers123 opened this issue Aug 6, 2023 · 3 comments

Comments

@blathers123
Copy link

blathers123 commented Aug 6, 2023

Me again, the problem child. Thanks for your work on getting the v2 api updated.

Unfortunately I'm receiving this error when I'm trying to list accounts.

File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/paths/v1_accounts/get.py", line 380, in list_account return self._list_account_oapg( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/paths/v1_accounts/get.py", line 316, in _list_account_oapg api_response = response_for_status.deserialize(response, self.api_client.configuration) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/api_client.py", line 952, in deserialize deserialized_body = body_schema.from_openapi_data_oapg( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 2452, in from_openapi_data_oapg return super().from_openapi_data_oapg(arg, _configuration=_configuration) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 494, in from_openapi_data_oapg path_to_schemas = cls.__get_new_cls(arg, validation_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 412, in __get_new_cls other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 1676, in _validate_oapg other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 1617, in __validate_args other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 1428, in _validate_oapg other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 1353, in __validate_items other_path_to_schemas = item_cls._validate_oapg( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 1676, in _validate_oapg other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 1617, in __validate_args other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 1676, in _validate_oapg other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 1617, in __validate_args other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/Documents/scripts/firefly_email_importer/venv/lib64/python3.11/site-packages/firefly_iii_client/schemas.py", line 913, in _validate_oapg raise ApiValueError(f"Invalid value {arg} passed in to {cls}, allowed_values={cls.MetaOapg.enum_value_to_name.keys()}") firefly_iii_client.exceptions.ApiValueError: Invalid value <NoneClass: None> passed in to <class 'firefly_iii_client.model.account_role_property.AccountRoleProperty'>, allowed_values=dict_keys(['defaultAsset', 'sharedAsset', 'savingAsset', 'ccAsset', 'cashWalletAsset', 'null'])

I'm following the example code in the newly generated docs. (here)

@ms32035
Copy link
Owner

ms32035 commented Aug 6, 2023

Looks like some problem mapping null to None. Unfortunately the openapi generator does not generate tests, so these things are likely to happen. Can't say upfront if it's a problem with the generated code, or the spec itself. Also probably won't be able to look into it for the next few days.

@blathers123
Copy link
Author

Gotcha. No rush from me, I appreciate your help

@ms32035
Copy link
Owner

ms32035 commented Apr 8, 2024

@blathers123 I generate a new build. maybe it was resolved? would you mind checking

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