-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError on _map_subobject #22
Comments
Hi @ericPavone, |
Hi @anikolaienko i tryied to contrib pushing the fix but with python 3.12 i got some issues on running the tests... anyway
|
Thanks @ericPavone , I'll try your code. Still would be amazing if you showed a unit test or just a runnable code sample, in which current code fails. For any fix or feature I usually create a unit test. FYI, I plan to release a new version this week with few new features and support for latest libraries. |
The error occurs in the _map_subobject function when attempting to instantiate a new object incorrectly. Specifically, the error arises in the else block when obj is not a dictionary and the skip_none_values flag is set to True. In this case, the code attempts to create a new object of the same type as obj by filtering out null or empty values from the sequence using a list comprehension. However, the object instantiation fails because the constructor for the object is unable to handle the additional argument passed through the list comprehension. This results in a TypeError indicating that the constructor expected only one positional argument but received two.
The text was updated successfully, but these errors were encountered: