fix(examples): Instantiate Session before reading account/region in optimize-example#6038
Open
Hannah14295 wants to merge 3 commits into
Open
fix(examples): Instantiate Session before reading account/region in optimize-example#6038Hannah14295 wants to merge 3 commits into
Hannah14295 wants to merge 3 commits into
Conversation
optimize-example.ipynb called Session.account_id() and Session.boto_region_name on the Session class, raising 'TypeError: account_id() missing 1 required positional argument: self'. Create a Session instance first and read the values from it.
Hannah14295
had a problem deploying
to
manual-approval
July 16, 2026 22:10 — with
GitHub Actions
Error
Hannah14295
requested a deployment
to
manual-approval
July 17, 2026 01:42 — with
GitHub Actions
Waiting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
optimize-example.ipynb called Session.account_id() and Session.boto_region_name on the Session class, raising 'TypeError: account_id() missing 1 required positional argument: self'. Create a Session instance first and read the values from it.
Issue #, if available:
N/A
Description of changes:
optimize-example.ipynb called Session.account_id() and Session.boto_region_name
on the Session class instead of an instance, so the first Configuration cell
failed with:
This creates a Session() instance first and reads account_id() / boto_region_name
from it. No functional change beyond fixing the crash.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.