dbbs-lab / bsb-core

The Brain Scaffold Builder
https://bsb.readthedocs.io
GNU General Public License v3.0
22 stars 16 forks source link

`filtered[0]` error when trying to compile #646

Closed martinaschiass closed 10 months ago

martinaschiass commented 2 years ago

This is my output log:

(cerebellum) martina@martina-Lenovo-B590:~/Scrivania/thesis$ bsb compile --verbosity 3 --plot prova.json --clear
Pulling 5 morphologies from linked <filesystem link '/home/martina/Scrivania/thesis/morphologies.hdf5'>.
Compiling the following strategies: granular_layer_placement, purkinje_layer_placement, granule_cell_to_purkinje_cell
Clearing data
Starting placement strategies: granular_layer_placement, purkinje_layer_placement
Queued 1 jobs for granular_layer_placement
Queued 1 jobs for purkinje_layer_placement
Placing 975 granule_cell in [0 0 0]
Placing 3 golgi_cell in [0 0 0]
Placing 4 purkinje_cell in [0 1 0]
Starting connectivity strategies: granule_cell_to_purkinje_cell
Queued 1 jobs for granule_cell_to_purkinje_cell
Traceback (most recent call last):
  File "/home/martina/.pyenv/versions/cerebellum/bin/bsb", line 8, in <module>
    sys.exit(handle_cli())
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/cli/__init__.py", line 10, in handle_cli
    handle_command(sys.argv[1:], exit=True)
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/cli/__init__.py", line 30, in handle_command
    namespace.handler(namespace, dryrun=dryrun)
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/cli/commands/__init__.py", line 98, in execute_handler
    self.handler(context)
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/cli/commands/_commands.py", line 137, in handler
    network.compile(
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/core.py", line 327, in compile
    self.run_connectivity(c_strats)
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/core.py", line 238, in run_connectivity
    pool.execute(loop)
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/services/pool.py", line 288, in execute
    job.execute(self.owner, job.f, job._args, job._kwargs)
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/services/pool.py", line 184, in execute
    return f(connectivity, *collections, **kwargs)
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/connectivity/detailed/voxel_intersection.py", line 57, in connect
    self._match_voxel_intersection(
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/connectivity/detailed/voxel_intersection.py", line 84, in _match_voxel_intersection
    morpho = cmset.get(cand, cache=self.cache, hard_cache=False)
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/morphologies/__init__.py", line 91, in get
    return self._get_one(data, cache, hard_cache)
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/morphologies/__init__.py", line 100, in _get_one
    self._loaders[idx].load().set_label_filter(self._labels).as_filtered()
  File "/home/martina/.pyenv/versions/3.9.13/envs/cerebellum/lib/python3.9/site-packages/bsb/morphologies/__init__.py", line 795, in as_filtered
    if filtered[0]:
IndexError: index 0 is out of bounds for axis 0 with size 0

Attached is the configuration file. prova.zip

Helveg commented 10 months ago

This has been fixed in #669