-
Notifications
You must be signed in to change notification settings - Fork 24
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
bunq.sdk.exception.BunqException: ApiContext has not been loaded. Please load ApiContext in BunqContext #92
Comments
Closing this issue as its not an bug. Please see: https://github.com/bunq/tinker_python/blob/3898543198df8c5a496fdb35dd70c994c556b102/tinker/libs/bunq_lib.py#L69-L73 for example on how to load the api context. |
Hello, It looks like an issue, your sample has the same issue tested your sample and the examples from github for storing i user this (from this github) then use something like this and you will get the same error |
These examples are outdated. see #84. You must load the Api context before using it as shown here: https://github.com/bunq/tinker_python/blob/3898543198df8c5a496fdb35dd70c994c556b102/tinker/libs/bunq_lib.py#L69-L73
sdk_python/bunq/sdk/model/generated/endpoint.py Lines 14895 to 14904 in 25c6e35
|
Hello OGKevin, Maybe a stupid question but why are the examples not updated? I see the code I am not a fulltime developer :-) |
you have updated from after you have ran
because they were examples and not essential to the release and therefore forgotten. Hence examples will be replaced with tinker as tinker contains enough "example code". |
Kevin, Can you provide an actual working running sample I can use as a starting point, not pointing to parts of this class but a actual sample I could run to for example read transactions, sending money or something. Regards, |
Steps to reproduce:
def register():
ctx = context.ApiContext(
context.ApiEnvironmentType.PRODUCTION,
"",
''
)
register()
using a simple like this one
https://github.com/bunq/sdk_python/blob/develop/examples/customer_statement_export_example.py#L24
line 24: api_context = context.ApiContext.restore() works with no issue and I see context info
line 25: user_id = endpoint.User.list(api_context).value[INDEX_FIRST]
.UserCompany.id
here you get the error
bunq.sdk.exception.BunqException: ApiContext has not been loaded. Please load ApiContext in BunqContext
What should happen:
What happens:
Traceback
SDK version and environment
production
Response id
Extra info:
Had no issue with my code using older sdk, with new sdk it stops working
The text was updated successfully, but these errors were encountered: