dbbs-lab / bsb-core

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

Can't load default config from outside repository #24

Closed Helveg closed 4 years ago

Helveg commented 4 years ago
In [2]: conf = JSONConfig()  # loads the default config which has granule & golgi configured
   ...: scaffold = Scaffold(conf)
   ...: 
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-2-6bd56f02d068> in <module>()
      1 conf = JSONConfig()  # loads the default config which has granule & golgi configured
----> 2 scaffold = Scaffold(conf)

/home/stefano/Documenti/cerebellum-scaffold/scaffold/core.py in __init__(self, config, from_file)
     74         # Use the configuration to initialise all components such as cells and layers
     75         # to prepare for the network architecture compilation.
---> 76         self._intialise_components()
     77         self._intialise_simulators()
     78 

/home/stefano/Documenti/cerebellum-scaffold/scaffold/core.py in _intialise_components(self)
    117         self._initialise_morphologies()
    118         self._initialise_placement_strategies()
--> 119         self._initialise_connection_types()
    120         self._initialise_simulations()
    121         self._initialise_hooks()

/home/stefano/Documenti/cerebellum-scaffold/scaffold/core.py in _initialise_connection_types(self)
    166     def _initialise_connection_types(self):
    167         for connection_type in self.configuration.connection_types.values():
--> 168             connection_type.initialise(self)
    169             # Wrap the connect function.
    170             connection_type._wrap_connect()

/home/stefano/Documenti/cerebellum-scaffold/scaffold/helpers.py in initialise(self, scaffold)
     51         self.cast_config()
     52         self.boot()
---> 53         self.validate()
     54 
     55     def boot(self):

/home/stefano/Documenti/cerebellum-scaffold/scaffold/connectivity/connectome/glomerulus_granule.py in validate(self)
     26                 )
     27             mr = self.scaffold.morphology_repository
---> 28             morphology = mr.get_morphology(morphologies[0])
     29             dendritic_compartments = morphology.get_compartments(["dendrites"])
     30             dendrites = {}

/home/stefano/Documenti/cerebellum-scaffold/scaffold/output.py in get_morphology(self, name, scaffold)
    443             Load a morphology from repository data
    444         """
--> 445         with self.load() as handler:
    446             # Check if morphology exists
    447             if not self.morphology_exists(name):

/usr/lib/python3.6/contextlib.py in __enter__(self)
     79     def __enter__(self):
     80         try:
---> 81             return next(self.gen)
     82         except StopIteration:
     83             raise RuntimeError("generator didn't yield") from None

/home/stefano/Documenti/cerebellum-scaffold/scaffold/output.py in load(self, mode)
     29             if self._handle is not None:
     30                 self.release_handle(self._handle)
---> 31             self._handle = self.get_handle(mode)
     32 
     33         def handler():

/home/stefano/Documenti/cerebellum-scaffold/scaffold/output.py in get_handle(self, mode)
    238         """
    239         # Open a new handle to the HDF5 resource.
--> 240         handle = HDF5TreeHandler.get_handle(self, mode)
    241         if handle.mode != "r":
    242             # Repository structure missing from resource? Create it.

/home/stefano/Documenti/cerebellum-scaffold/scaffold/output.py in get_handle(self, mode)
     68         """
     69         # Open a new handle to the resource.
---> 70         return h5py.File(self.file, mode)
     71 
     72     def release_handle(self, handle):

/home/stefano/.local/lib/python3.6/site-packages/h5py/_hl/files.py in __init__(self, name, mode, driver, libver, userblock_size, swmr, rdcc_nslots, rdcc_nbytes, rdcc_w0, track_order, **kwds)
    406                 fid = make_fid(name, mode, userblock_size,
    407                                fapl, fcpl=make_fcpl(track_order=track_order),
--> 408                                swmr=swmr)
    409 
    410             if isinstance(libver, tuple):

/home/stefano/.local/lib/python3.6/site-packages/h5py/_hl/files.py in make_fid(name, mode, userblock_size, fapl, fcpl, swmr)
    171         if swmr and swmr_support:
    172             flags |= h5f.ACC_SWMR_READ
--> 173         fid = h5f.open(name, flags, fapl=fapl)
    174     elif mode == 'r+':
    175         fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/h5f.pyx in h5py.h5f.open()

OSError: Unable to open file (unable to open file: name = 'morphologies.hdf5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Helveg commented 4 years ago

Same as #43