-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hi, I ran across this error today which seems like a bug:
$ python -c "import yyjson; yyjson.dumps({'a':'a', 2:2})"
TypeError: bad argument type for built-in operation
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "~/.pyenv/versions/3.11.7/lib/python3.11/site-packages/yyjson/__init__.py", line 71, in dumps
return Document(obj, default=default).dumps()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'cyyjson.Document'> returned a result with an exception se
The preferred behavior here would probably be to raise a ValueError with a descriptive message about the dict key not being a string.
This was tested with py_yyjson v4.0.6 from pypi.
Thanks!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working