deanmcgregor / ynab-python

Auto-Generated Python API for YNAB
98 stars 41 forks source link

Required `transfer_account_id` when fetching budgets #7

Open maheffa opened 5 years ago

maheffa commented 5 years ago

Why is it that I'm getting the following error when calling get_budget_by_id

...
~/.virtualenvs/ynab/lib/python3.6/site-packages/ynab/models/payee.py in transfer_account_id(self, transfer_account_id)
    122         """
    123         if transfer_account_id is None:
--> 124             raise ValueError("Invalid value for `transfer_account_id`, must not be `None`")  # noqa: E501
    125
    126         self._transfer_account_id = transfer_account_id
ValueError: Invalid value for `transfer_account_id`, must not be `None`

Looking into the source, it seems to be a strong requirement. However, when curL-ing the endpoint, I see that the majority of my transactions have transfer_account_id: null

blindawson commented 5 years ago

Running into this issue as well. Any solutions or recommended workarounds would be appreciated. Thanks!

ndelah commented 4 years ago

Running in this issue as well. Has anyone found a fix in the meantime?

pfdevmuller commented 4 years ago

I think it is because the API spec has changed. I got around it by giving up on importing these generated python clients as a dependency, and just generating it on the fly instead.

You can see my invocation in my project here: https://github.com/pfdevmuller/MailToYnab/blob/master/generate_ynab_swagger_client.sh