rienafairefr / pynYNAB

a python client for the new YNAB
MIT License
138 stars 12 forks source link

Can't create new client. Returning NoBudgetNameException #67

Closed IndexEng closed 5 years ago

IndexEng commented 5 years ago

Hello,

Writing a basic script to scrape loan repayments with particular tags. When I create a client by copying the example:

from pynYNAB.Client import nYnabClient

client = nYnabClient(email="############", password="######", budgetname='TestBudget')
client.sync()

It returns: pynYNAB.exceptions.NoBudgetNameException: you should pass a budget_name

I have checked login details and the budget name for correctness but cannot determine what is causing this exception.

rienafairefr commented 5 years ago

I renamed some parameters some time ago for consistency (all snake_case), so maybe if you use budget_name='TestBudget' instead it's going to work. I had put a transitional release which handled both budgetname and budget_name but I'm pretty sure budgetname argument is fully deprecated now. I should probably show a better error message, sorry about that.

IndexEng commented 5 years ago

No worries, thanks for the prompt reply. I did dive into the source and checked the exception, I noticed the snake case change and tried it as budget_name and Budget_Name but still no luck.

IndexEng commented 5 years ago

Hello, read through a few of the old issues and follwed your advice provided in a previous issue. Can I suggest you update the documentation to reflect this change?