smard-api
smard-api copied to clipboard
ApiTypeError when some None values are returned.
When querying some timestamps, it might happen, that the service returns some None values. The python client cannot handle them and returns the error
deutschland.smard.exceptions.ApiTypeError: Invalid type for variable '1'. Required value type is float and passed type was NoneType at ['received_data']['series'][87][1]
Can the model be updated to allow None values? I would rather have some None values in the response than an exception in this particular case.
I figured out that you can do
configuration = smard.Configuration(
discard_unknown_keys=True
)
However I still think this should be default.