Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node name not working in RequirementError during Configuration.default #826

Open
Helveg opened this issue Mar 26, 2024 · 0 comments
Open

Comments

@Helveg
Copy link
Contributor

Helveg commented Mar 26, 2024

>>> Configuration.default(connectivity=dict(x=dict(strategy="bsb.connectivity.VoxelIntersection", presynaptic=dict(cell_types="A"))))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/mnt/d/GIT/bsb/bsb/config/_config.py", line 157, in default
    conf = cls(default_args)
  File "/mnt/d/GIT/bsb/bsb/config/_make.py", line 72, in __call__
    instance = meta_subject.__new__(
  File "/mnt/d/GIT/bsb/bsb/config/_make.py", line 225, in __new__
    instance.__post_new__(**kwargs)
  File "/mnt/d/GIT/bsb/bsb/config/_make.py", line 333, in __post_new__
    _bubble_up_exc(e, self._meta)
  File "/mnt/d/GIT/bsb/bsb/config/_make.py", line 352, in _bubble_up_exc
    errr.wrap(type(exc), exc, append=node + attr)
  File "/home/robin/.pyenv/versions/bsb/lib/python3.9/site-packages/errr/__init__.py", line 7, in wrap
    return err_type.wrap(*args, **kwargs)
  File "/home/robin/.pyenv/versions/bsb/lib/python3.9/site-packages/errr/exception.py", line 132, in wrap
    raise err from None
  File "/mnt/d/GIT/bsb/bsb/config/_make.py", line 331, in __post_new__
    post_new(self, *args, _parent=None, _key=None, **kwargs)
  File "/mnt/d/GIT/bsb/bsb/config/_make.py", line 297, in __post_new__
    setattr(self, name, value)
  File "/mnt/d/GIT/bsb/bsb/config/_attrs.py", line 827, in __set__
    self.fill(value, _parent=instance, _key=_key or self.attr_name),
  File "/mnt/d/GIT/bsb/bsb/config/_attrs.py", line 836, in fill
    _cfgdict.update(value or builtins.dict())
  File "/mnt/d/GIT/bsb/bsb/config/_attrs.py", line 777, in update
    self[ckey] = value
  File "/mnt/d/GIT/bsb/bsb/config/_attrs.py", line 721, in __setitem__
    value = self._elem_type(value, _parent=self, _key=key)
  File "/mnt/d/GIT/bsb/bsb/config/_make.py", line 72, in __call__
    instance = meta_subject.__new__(
  File "/mnt/d/GIT/bsb/bsb/config/_make.py", line 225, in __new__
    instance.__post_new__(**kwargs)
  File "/mnt/d/GIT/bsb/bsb/config/_make.py", line 279, in __post_new__
    raise RequirementError(f"Missing required attribute '{name}'")
bsb.exceptions.RequirementError: Missing required attribute 'postsynaptic' in {standalone}.x

The node name should be {root}.connectivity.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant