webknossos-libs
webknossos-libs copied to clipboard
Provide more meanigful error messages in case empty folder is present during metadata update
This issue is about displaying a better error message if an empty folder is present during a metadata refresh using wkcuber. I got the error message disaplyed in the last line of the logs below. Not sure whether it should be an error/warning or simlpy be ignored.
Not sure whether the error from the first line of the logs is also an issue. I guess I should upgrade voxelytics as well in case I upgrade wkcube in an environment?
ERROR: voxelytics 0.1.0 has requirement wkcuber==0.2.35, but you'll have wkcuber 0.2.36 which is incompatible.
Installing collected packages: wkcuber
Found existing installation: wkcuber 0.2.35
Uninstalling wkcuber-0.2.35:
Successfully uninstalled wkcuber-0.2.35
Successfully installed wkcuber-0.2.36
(segm-3.6) berninm@login000 ~/python/code/voxelytics manuel_crick python -m wkcuber.metadata --refresh /camp/svc/www/proj-emschaefer/webknossos-datastore/C525b-12_mesh7
/camp/home/berninm/.conda/envs/segm-3.6/lib/python3.6/runpy.py:125: RuntimeWarning: 'wkcuber.metadata' found in sys.modules after import of package 'wkcuber', but prior to execution of 'wkcuber.metadata'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
Traceback (most recent call last):
File "/camp/home/berninm/.conda/envs/segm-3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/camp/home/berninm/.conda/envs/segm-3.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/camp/home/berninm/.conda/envs/segm-3.6/lib/python3.6/site-packages/wkcuber/metadata.py", line 352, in <module>
refresh_metadata(args.path, args.max_id, args.compute_max_id)
File "/camp/home/berninm/.conda/envs/segm-3.6/lib/python3.6/site-packages/wkcuber/metadata.py", line 116, in refresh_metadata
detect_layers(wkw_path, max_id, compute_max_id, exact_bounding_box)
File "/camp/home/berninm/.conda/envs/segm-3.6/lib/python3.6/site-packages/wkcuber/metadata.py", line 318, in detect_layers
dataset_path, "segmentation", max_id, compute_max_id, exact_bounding_box
File "/camp/home/berninm/.conda/envs/segm-3.6/lib/python3.6/site-packages/wkcuber/metadata.py", line 284, in detect_segmentation_layer
dataset_path, layer_name, exact_bounding_box, category="segmentation"
File "/camp/home/berninm/.conda/envs/segm-3.6/lib/python3.6/site-packages/wkcuber/metadata.py", line 249, in detect_standard_layer
bbox = detect_bbox(dataset_path, layer_name, mags[0])
File "/camp/home/berninm/.conda/envs/segm-3.6/lib/python3.6/site-packages/wkcuber/metadata.py", line 216, in detect_bbox
xs, ys, zs = list(zip(*list_cubes(layer_path)))