cdgriffith / cdgriffith/Box

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

Open
#250 2 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Python
Stars
2.8k
Forks
135
PR merge metrics
No merged PRs in 30d

Description

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 "", line 1, in
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: "'' 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.