Solution
The warning is reported as the API session was created, but not closed. When running the code, a second time, the warning will be shown since the previous session was not closed.
To avoid this, you should close the API session when no longer needed. For instance, if you are using the Tag API, you can use the
.api_client.close()method. Taking the above code snippet as reference, the following line would close the session:
await tags_api.api_client.close()Another way to avoid this error would be to restart the kernel before running the code again. The user interface has two buttons to accomplish this:
The
button will restart the kernel, while the
button will restart the kernel and re-run the whole notebook.