wesselt / bunq2ynab

Upload bunq transactions to ynab
Other
75 stars 20 forks source link

AttributeError: 'str' object has no attribute 'values' #42

Closed SirCampsalot1611 closed 1 year ago

SirCampsalot1611 commented 1 year ago

When executing bunq2ynab.py I recently get this error messsage: 2023-07-04 08:57:00,751 | INFO | sync.py:60 | populate | Retrieving bunq accounts... Traceback (most recent call last): File "bunq2ynab.py", line 10, in sync.populate() File "/home/pi/bunq2ynab/bunq2ynab_hauptkonto/lib/sync.py", line 61, in populate self.bunq_accounts = list(bunq_api.get_accounts()) File "/home/pi/bunq2ynab/bunq2ynab_hauptkonto/lib/bunq_api.py", line 109, in get_accounts for u in [first_value(u) for u in bunq.get("v1/user")]: File "/home/pi/bunq2ynab/bunq2ynab_hauptkonto/lib/bunq_api.py", line 109, in for u in [first_value(u) for u in bunq.get("v1/user")]: File "/home/pi/bunq2ynab/bunq2ynab_hauptkonto/lib/bunq_api.py", line 91, in first_value return next(iter(data.values())) AttributeError: 'str' object has no attribute 'values'

This message appears without me making any change to the script. The script has worked so far without any problem.

deltawessel commented 1 year ago

Hi Sircampsalot1611, looks like it doesn't like the reply to v1/users. Does the list_user.py script give the same error? If so, could you post or mail me the output of list_user.py -v ?

SirCampsalot1611 commented 1 year ago

list_users.pylists the users without any error message. For an unknown reason bunq2ynab.py started working with any problems again, so the problem solved itself. To my apology: The problem was reproducible. The error occured several times. But thanks for your help!

deltawessel commented 1 year ago

Good to hear! I'm having issues with receiving callbacks myself, perhaps bunq is working on the API.