Skip to content

Map_blocks error: zip argument #2 must support iteration #6762

Answered by dcherian
tlsw231 asked this question in Q&A
Discussion options

You must be logged in to vote

template.chunks is None. It needs to have the expected output chunking.

A PR raising a nice error message here when if not template.chunksizes: would be very welcome

We can also delete the if clause here:

if isinstance(template, DataArray):
output_chunks = dict(
zip(template.dims, template.chunks) # type: ignore[arg-type]
)
else:
output_chunks = dict(template.chunks)

and use the new chunksizes property: output_chunks = template.chunksizes

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by tlsw231
Comment options

You must be logged in to vote
4 replies
@tlsw231
Comment options

@tlsw231
Comment options

@dcherian
Comment options

@tlsw231
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants