Skip to content

BUG clarify DataTree constructor error for mappings - #11515

Draft
aryansk wants to merge 2 commits into
pydata:mainfrom
aryansk:codex/xarray-11514
Draft

BUG clarify DataTree constructor error for mappings#11515
aryansk wants to merge 2 commits into
pydata:mainfrom
aryansk:codex/xarray-11514

Conversation

@aryansk

@aryansk aryansk commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #11514

DataTree accepts Dataset, Coordinates, or None, but its TypeError text incorrectly says dict is accepted. Update the message to list Coordinates and add regression coverage for a mapping input.

Testing:

  • uv run --no-project --python 3.13 --with pytest --with numpy --with pandas --with packaging --with hypothesis python -m pytest -q -o addopts= xarray/tests/test_datatree.py -k "test_create_with_data"

Prepared with AI assistance; maintainer review is requested.

@github-actions github-actions Bot added the topic-DataTree Related to the implementation of a DataTree class label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-DataTree Related to the implementation of a DataTree class

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataTree constructor error message says dict even though dict is not accepted

1 participant