sdk_python
sdk_python copied to clipboard
Lots of warnings when using the library
Steps to reproduce:
- Install the latest bunq_sdlk version
- Load/Create an API context
- Call any endpoint
What should happen:
- 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
- [x] Sandbox
- [ ] Production
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