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

Lots of warnings when using the library #155

Open
1 of 2 tasks
fleaz opened this issue Mar 31, 2021 · 1 comment
Open
1 of 2 tasks

Lots of warnings when using the library #155

fleaz opened this issue Mar 31, 2021 · 1 comment

Comments

@fleaz
Copy link

fleaz commented Mar 31, 2021

Steps to reproduce:

  1. Install the latest bunq_sdlk version
  2. Load/Create an API context
  3. Call any endpoint

What should happen:

  1. No errors or warnings when using the latest stable release

What happens:

I get half a screen full of warnings because the json converter encountered keys that it is not aware of. Example:

/usr/local/lib/python3.8/site-packages/bunq/sdk/json/converter.py:294: UserWarning: [bunq SDK beta] Key "style" in "Avatar" is unknown.
  warnings.warn(cls._WARNING_KEY_UNKNOWN.format(key, context_name))
/usr/local/lib/python3.8/site-packages/bunq/sdk/json/converter.py:294: UserWarning: [bunq SDK beta] Key "country" in "MonetaryAccountBank" is unknown.
  warnings.warn(cls._WARNING_KEY_UNKNOWN.format(key, context_name))
/usr/local/lib/python3.8/site-packages/bunq/sdk/json/converter.py:294: UserWarning: [bunq SDK beta] Key "timezone" in "MonetaryAccountBank" is unknown.
  warnings.warn(cls._WARNING_KEY_UNKNOWN.format(key, context_name))
/usr/local/lib/python3.8/site-packages/bunq/sdk/json/converter.py:294: UserWarning: [bunq SDK beta] Key "profile_action_required" in "MonetaryAccountProfile" is unknown.

SDK version and environment

  • Tested on 1.14.18
  • Sandbox
  • Production
@Hattorius
Copy link

You can turn off these warnings by importing the warning module: https://docs.python.org/3/library/warnings.html

import warnings

warnings.simplefilter("ignore")

^ that should do the trick

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

2 participants