Skip to content

BoxKeyError when constructing a Box with box_dots = True in v7.0.0 #250

Open
@roosephu

Description

@roosephu

To reproduce:

>>> import box
>>> box.__version__
'7.0.0'
>>> box.Box({'a.b': 1})
Box({'a.b': 1})
>>> box.Box({'a.b': 1}, box_dots=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "box/box.py", line 286, in box.box.Box.__init__
  File "box/box.py", line 653, in box.box.Box.__setitem__
box.exceptions.BoxKeyError: "'<class 'box.box.Box'>' object has no attribute a"

It seems to work in v6.0.2:

>>> import box
>>> box.__version__
'6.0.2'
>>> box.Box({'a.b': 1})
Box({'a.b': 1})
>>> box.Box({'a.b': 1}, box_dots=True)
Box({'a.b': 1})

Python 3.10.9.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions