Skip to content

Commit 2e1a13a

Browse files
fix dtype detection
1 parent 46033a8 commit 2e1a13a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

wkcuber/metadata.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None):
151151
else:
152152
bbox = exact_bounding_box
153153

154-
dtype = detect_dtype(dataset_path, layer_name)
155-
156154
mags = list(detect_resolutions(dataset_path, layer_name))
157155
mags = sorted(mags)
158156
resolutions = [
@@ -163,6 +161,9 @@ def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None):
163161
for mag in mags
164162
]
165163

164+
assert len(mags) > 0, "No resolutions found"
165+
dtype = detect_dtype(dataset_path, layer_name, mags[0])
166+
166167
return {
167168
"dataFormat": "wkw",
168169
"name": layer_name,

0 commit comments

Comments
 (0)