bunq / tinker_python

Install Tinker by just running this command: bash <(curl -s https://tinker.bunq.com/python/setup.sh)
MIT License
15 stars 8 forks source link

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

Open metawilm opened 1 year ago

metawilm commented 1 year ago

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 commented 1 year ago

Having the same issue.

leviouwendijk commented 3 months ago

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