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
Traceback (most recent call last):
File "my_test_file.py", line 15, in <module>
faker.json(data_columns=schema_to_test, num_rows=1)
File "<route to my python libs>/lib/python3.11/site-packages/faker/providers/misc/__init__.py", line 614, in json
return json.dumps(create_json_structure(data_columns), indent=indent, cls=cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<route to my python libs>/lib/python3.11/site-packages/faker/providers/misc/__init__.py", line 611, in create_json_structure
raise TypeError("Invalid data_columns type. Must be a dictionary or list")
TypeError: Invalid data_columns type. Must be a dictionary or list
I actually make it works by creating my own provider copying the code of the library and changing this nested function:
Miscellaneous method
json
seems to not work properly with list of tuples values when there are nested elements when using data columns list formatSteps to reproduce
Run a python code like this
Expected behavior
Function should return something like this:
Actual behavior
Fails abruptly with the a stack trace like this:
I actually make it works by creating my own provider copying the code of the library and changing this nested function:
And changing my scheme to:
The text was updated successfully, but these errors were encountered: