Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update interactive_weather_plot.py #128

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

Merged
x4nth055 merged 1 commit into x4nth055:master from TsKyrk:patch-1
Sep 29, 2025
Merged

Conversation

Copy link
Contributor

@TsKyrk TsKyrk commented Aug 25, 2023

I am using Python 3.11.3
I was having this error : "TypeError: 'dict_keys' object is not subscriptable" locations.keys() had to be explicitly converted into list to prevent this exception.

I am using Python 3.11.3
I was having this error : "TypeError: 'dict_keys' object is not subscriptable"
locations.keys() had to be explicitly converted into list to prevent this exception.
Copy link
Owner

@x4nth055 x4nth055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving: This change correctly converts locations.keys() to list(locations.keys()) for the RadioButtons labels. In Python 3.11+ with current Matplotlib, passing a dict_keys view raises TypeError: 'dict_keys' object is not subscriptable because RadioButtons expects an indexable sequence. Wrapping in list(...) resolves the error and is backward compatible. I reproduced the TypeError and verified the fix in a sandbox environment. LGTM.

@x4nth055 x4nth055 merged commit bf1862e into x4nth055:master Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@x4nth055 x4nth055 x4nth055 approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /