When you try to insert a string, operation completes successfully. After that, ValueError: dictionary update sequence element #0 has length 1; 2 is required is thrown at any operation.
It's not a real bug since it is explicitly said in the docs that TinyDB expects inserted element to be a set, but anyway it's not good that such destructive operation is allowed. Maybe an exception on inserting anything except set will be more appropriate?
When you try to insert a string, operation completes successfully. After that,
ValueError: dictionary update sequence element #0 has length 1; 2 is requiredis thrown at any operation.It's not a real bug since it is explicitly said in the docs that TinyDB expects inserted element to be a set, but anyway it's not good that such destructive operation is allowed. Maybe an exception on inserting anything except set will be more appropriate?