Skip to content

Commit a33a46a

Browse files
committed
fix error message; comments [ci skip]
1 parent f284794 commit a33a46a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zarr/convenience.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,13 +787,14 @@ def _copy(log, source, dest, name, root, shallow, without_attrs, if_exists,
787787
raise ValueError('if_exists must be one of {!r}; found {!r}'
788788
.format(valid_if_exists, if_exists))
789789
if dest_h5py and if_exists == 'skip_initialized':
790-
raise ValueError('{!r} can only be used then copying to zarr'
790+
raise ValueError('{!r} can only be used when copying to zarr'
791791
.format(if_exists))
792792

793793
# determine name to copy to
794794
if name is None:
795795
name = source.name.split('/')[-1]
796796
if not name:
797+
# this can happen if source is the root group
797798
raise TypeError('source has no name, please provide the `name` '
798799
'parameter to indicate a name to copy to')
799800

0 commit comments

Comments
 (0)