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
{{ message }}
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.
I’m encountering a ValidationError when using the equinix_metal Python SDK while trying to call the find_project_usage method. The error seems to occur because the price, quantity, and total fields are expected to be strings, but the API is returning them as floats.
Traceback (most recent call last):
File "/path/to/project/test-equinix-metal.py", line 19, in<module>
api_response = api_instance.find_project_usage(project_id)
File "/path/to/project/.venv/lib/python3.11/site-packages/equinix_metal/api/usages_api.py", line 409, in find_project_usage
return self.api_client.response_deserialize(
File "/path/to/project/.venv/lib/python3.11/site-packages/equinix_metal/api_client.py", line 316, in response_deserialize
return_data = self.deserialize(response_text, response_type)
File "/path/to/project/.venv/lib/python3.11/site-packages/equinix_metal/api_client.py", line 392, in deserialize
return self.__deserialize(data, response_type)
File "/path/to/project/.venv/lib/python3.11/site-packages/equinix_metal/api_client.py", line 437, in __deserialize
return self.__deserialize_model(data, klass)
File "/path/to/project/.venv/lib/python3.11/site-packages/equinix_metal/api_client.py", line 759, in __deserialize_model
return klass.from_dict(data)
File "/path/to/project/.venv/lib/python3.11/site-packages/equinix_metal/models/project_usage_list.py", line 94, in from_dict
"usages": [ProjectUsage.from_dict(_item) for_itemin obj["usages"]] if obj.get("usages") is not None else None
File "/path/to/project/.venv/lib/python3.11/site-packages/equinix_metal/models/project_usage.py", line 92, in from_dict
_obj = cls.model_validate({
File "/path/to/project/.venv/lib/python3.11/site-packages/pydantic/main.py", line 568, in model_validate
return cls.__pydantic_validator__.validate_python(
pydantic_core._pydantic_core.ValidationError: 3 validation errors for ProjectUsage
price
Input should be a valid string [type=string_type, input_value=2.45, input_type=float]
quantity
Input should be a valid string [type=string_type, input_value=195.0, input_type=float]
total
Input should be a valid string [type=string_type, input_value=477.75, input_type=float]
The text was updated successfully, but these errors were encountered:
# for freeto subscribe to this conversation on GitHub.
Already have an account?
#.
I’m encountering a ValidationError when using the
equinix_metal
Python SDK while trying to call thefind_project_usage
method. The error seems to occur because the price, quantity, and total fields are expected to be strings, but the API is returning them as floats.Code to Reproduce:
Error Traceback:
The text was updated successfully, but these errors were encountered: