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

Tinker scripts give ModuleNotFoundError: No module named 'bunq.sdk.client' #34

Open
metawilm opened this issue Nov 17, 2022 · 2 comments

Comments

@metawilm
Copy link

Trying to get the tinker scripts to work in Python 3.8. In setup.sh I changed it to include the interpreter: PIPENV_VENV_IN_PROJECT=1 pipenv --python /usr/bin/python3 install

The installation seems to succeed. However running the tinker scripts fail:

./tinker/update_account.py 
Traceback (most recent call last):
  File "./tinker/update_account.py", line 2, in <module>
    from libs.bunq_lib import BunqLib
  File "/home/dave2/b2/tinker/libs/bunq_lib.py", line 8, in <module>
    from bunq.sdk.client import Pagination
ModuleNotFoundError: No module named 'bunq.sdk.client'
@jmvermeulen
Copy link

Having the same issue.

@leviouwendijk
Copy link

leviouwendijk commented Apr 14, 2024

That's because Bunq's examples, so far as I can see, are still using outdated import statements.

I did some pydoc digging, to see where the package contents actually are. I'll attach a .txt with the true bunq.sdk contents.

It implies that Pagination is actually in bunq.sdk.http.pagination.

Thus: change the import statement from this:
from bunq.sdk.client import Pagination
to this:
from bunq.sdk.http.pagination import Pagination

Doing this has resolved the import error for me.

bunq-sdk-corrected-import-package-listing.txt

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

3 participants