Skip to content

Fix website generation for non-default plot types - #463

Open
brianpm wants to merge 1 commit into
NCAR:mainfrom
brianpm:fix-nondefault-plot-type
Open

Fix website generation for non-default plot types#463
brianpm wants to merge 1 commit into
NCAR:mainfrom
brianpm:fix-nondefault-plot-type

Conversation

@brianpm

@brianpm brianpm commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Any plotting script using a plot_type outside "default_ptypes" crashed website generation with "TypeError: unhashable type: 'collections.OrderedDict'" from template_index.html.

The loop meant to register an unrecognized plot type appended the plot_types dict rather than the plot type itself, so index.html then tried to use that dict as a dictionary key.

Also copy the default list before appending. "res" is the shared variable-defaults dictionary and this loop runs once per web-data entry, so appending in place permanently modified the loaded defaults.

Verified with a plotting script registering plot_type "CloudRegimes": the tab now renders on index.html and the generated site has no broken internal links.

Any plotting script using a plot_type outside "default_ptypes" crashed
website generation with "TypeError: unhashable type:
'collections.OrderedDict'" from template_index.html.

The loop meant to register an unrecognized plot type appended the
plot_types dict rather than the plot type itself, so index.html then
tried to use that dict as a dictionary key.

Also copy the default list before appending. "res" is the shared
variable-defaults dictionary and this loop runs once per web-data entry,
so appending in place permanently modified the loaded defaults.

Verified with a plotting script registering plot_type "CloudRegimes":
the tab now renders on index.html and the generated site has no broken
internal links.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants