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
I expect to be able to output something like this (using t.as_string()):
foo = 2bar.baz = 1bar.qux = 1
Instead, I get this exception:
Traceback (most recent call last):
File "/tmp/script.py", line 6, in <module>
t.add(tomlkit.key(["bar", "qux"]), 1)
File "/usr/lib/python3/dist-packages/tomlkit/items.py", line 1478, in add
return self.append(key, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/tomlkit/items.py", line 1584, in append
self._value.append(key, _item)
File "/usr/lib/python3/dist-packages/tomlkit/container.py", line 188, in append
self._handle_dotted_key(key, item)
File "/usr/lib/python3/dist-packages/tomlkit/container.py", line 150, in _handle_dotted_key
self.append(name, value)
File "/usr/lib/python3/dist-packages/tomlkit/container.py", line 243, in append
self._table_keys[-1] != current_body_element[0]
~~~~~~~~~~~~~~~~^^^^
IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
fflorent
added a commit
to fflorent/tomlkit
that referenced
this issue
Mar 4, 2023
Version of tomlkit: 0.11.6
I get an exception when running this script (this seems to be the minimal scenario):
I expect to be able to output something like this (using
t.as_string()
):Instead, I get this exception:
The text was updated successfully, but these errors were encountered: