You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
d = benedict({'jobs': [{'name': 'job-name', 'plan': [{'put': 'put-name', 'params': {'action': 'create', 'fields': {'Version/s': [{'name': 'N/A'}], 'User Impact': 'Info on User Impacts'}}}]}]}, keypath_separator='/') outputs :
On 0.16.0
{'jobs': [{'name': 'job-name', 'plan': [{'put': 'put-name', 'params': {'action': 'create', 'fields': {'Version/s': [{'name': 'N/A'}], 'User Impact': 'Info on User Impacts'}}}]}]}
On 0.17.0
File "/usr/local/lib/python3.7/site-packages/benedict/dicts/keypath/keypath_util.py", line 23, in check_key
''{}', found: '{}'.'.format(separator, key))
ValueError: keys should not contain keypath separator '/', found: 'Version/s'.
Expected behavior
We saw this error while running our unit tests.
I didn't see a specific bugfix, I suppose that 0.17.0 is the correct behavior?
Can you please confirm it?
The text was updated successfully, but these errors were encountered:
@rbentaarit if your dict keys contain the keypath_separator you can initialize the dict with keypath_separator=None, call standardize, then you can set keypath_separator to the char you need.
Python version
3.7.5
Package version
0.17.0
Current behavior (bug description)
d = benedict({'jobs': [{'name': 'job-name', 'plan': [{'put': 'put-name', 'params': {'action': 'create', 'fields': {'Version/s': [{'name': 'N/A'}], 'User Impact': 'Info on User Impacts'}}}]}]}, keypath_separator='/')
outputs :
On 0.16.0
{'jobs': [{'name': 'job-name', 'plan': [{'put': 'put-name', 'params': {'action': 'create', 'fields': {'Version/s': [{'name': 'N/A'}], 'User Impact': 'Info on User Impacts'}}}]}]}
On 0.17.0
File "/usr/local/lib/python3.7/site-packages/benedict/dicts/keypath/keypath_util.py", line 23, in check_key
''{}', found: '{}'.'.format(separator, key))
ValueError: keys should not contain keypath separator '/', found: 'Version/s'.
Expected behavior
We saw this error while running our unit tests.
I didn't see a specific bugfix, I suppose that 0.17.0 is the correct behavior?
Can you please confirm it?
The text was updated successfully, but these errors were encountered: