You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from ynab_sdk import YNAB
try:
api_key = "12312123.....123123"
apicheck = YNAB(api_key)
data = apicheck.budgets.get_budget("12345678-f349-410e-8ae8-d35672845374")
print(repr(data.data.budget))
except Exception:
raise
The response:
Traceback (most recent call last):
File "/Users/andreas/Downloads/apitest.py", line 21, in <module>
data = apicheck.budgets.get_budget("12345678-f349-410e-8ae8-d35672845374")
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ynab_sdk/api/budgets.py", line 17, in get_budget
return BudgetDetailResponse.from_dict(response)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ynab_sdk/api/models/responses/budget_detail.py", line 505, in from_dict
data = Data.from_dict(obj.get("data"))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ynab_sdk/api/models/responses/budget_detail.py", line 493, in from_dict
budget = Budget.from_dict(obj.get("budget"))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ynab_sdk/api/models/responses/budget_detail.py", line 455, in from_dict
subtransactions = parsers.from_list(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ynab_sdk/utils/parsers.py", line 47, in from_list
return [f(y) for y in x]
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ynab_sdk/utils/parsers.py", line 47, in <listcomp>
return [f(y) for y in x]
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ynab_sdk/api/models/responses/budget_detail.py", line 276, in from_dict
category_id = parsers.from_str(obj.get("category_id"))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ynab_sdk/utils/parsers.py", line 16, in from_str
raise ex
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ynab_sdk/utils/parsers.py", line 11, in from_str
assert isinstance(x, str)
I have a certain type of split transaction (mix of category and account) that is causing this issue (image attached):
Hi @andreroggeri Thank you very much! I can’t find release 2.4, so that I can use it as a dependency and test it with my other software. Could you publish the release or is it somewhere already?
Hi!
I have some issue with the sdk and my budget.
Calling this code will raise an error:
The response:
I have a certain type of split transaction (mix of category and account) that is causing this issue (image attached):
When I create this kind of transaction in a test budget, that is working otherwise, it fails. As soon as I delete it, the call is working fine.
Could you make your api handle this case? I am no programmer, so I cannot figure it myself and provide you with a pull request.
Thank you!
Andreas
The text was updated successfully, but these errors were encountered: