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

extended-accounts returns null #132

Closed
felciano opened this issue Feb 9, 2018 · 2 comments
Closed

extended-accounts returns null #132

felciano opened this issue Feb 9, 2018 · 2 comments

Comments

@felciano
Copy link
Contributor

felciano commented Feb 9, 2018

I'm getting a null return consistently when using the --extended-accounts command-line switch. This happens irrespective of whether I also include the --accounts switch or have --extended-accounts on its own. Has anyone else run into this?

@felciano
Copy link
Contributor Author

felciano commented Feb 9, 2018

I think this might be a configuration issue. The null is from an except clause thrown because a call to mintapi.make_accounts_presentable is failing because it can't find that function. When I tryfrom mintapi import make_accounts_presentable, I get

ImportError: cannot import name 'make_accounts_presentable'

It looks like the function isn't seen:

import mintapi
print(dir(mintapi))

yields

['Mint', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'api', 'get_accounts', 'get_budgets', 'initiate_account_refresh', 'main', 'print_accounts']

Shouldn't make_accounts_presentable show up in that list of module attributes?

Ramon

@felciano
Copy link
Contributor Author

felciano commented Feb 9, 2018

Figured it out -- I didn't realize these methods were shadowed in the api module. In case anyone else runs into this, the following will allow you to access any method in the mintapi module.

from mintapi import api
from mintapi.api import make_accounts_presentable
from mintapi.api import get_accounts

This is useful if, for example, you want to write a different commandline client by copying and extending the existing main() method, which makes calls to make_accounts_presentable and get_accounts.

@felciano felciano closed this as completed Feb 9, 2018
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

1 participant