import amazon.ion.simpleion as ion
ion.dumps({'': ''})
Gives you:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/simpleion.py", line 283, in dumps
dump(obj, ion_buffer, imports=imports, sequence_as_stream=sequence_as_stream, binary=binary, skipkeys=skipkeys,
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/simpleion.py", line 158, in dump
_dump(obj, writer, from_type)
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/simpleion.py", line 220, in _dump
_dump(val, writer, from_type, field, in_struct=True, depth=depth+1)
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/simpleion.py", line 231, in _dump
writer.send(event)
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/writer.py", line 150, in blocking_writer
for result_event in _drain(writer, ion_event):
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/writer.py", line 129, in _drain
result_event = writer.send(ion_event)
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/writer.py", line 111, in writer_trampoline
trans = trans.delegate.send(Transition(ion_event, trans.delegate))
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/writer_binary.py", line 214, in _managed_binary_writer_coroutine
write_event = value_writer.send(ion_event)
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/writer.py", line 111, in writer_trampoline
trans = trans.delegate.send(Transition(ion_event, trans.delegate))
File "/code/ion-is-cool/.venv/lib/python3.8/site-packages/amazon/ion/writer_binary_raw.py", line 353, in _raw_writer_coroutine
_write_varuint(sid_buffer, ion_event.field_name.sid) # Write the field name's symbol ID.
AttributeError: 'str' object has no attribute 'sid'
Reproduction case:
Gives you: