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
File "/app/pylfc/s3.py", line 196, in create_bucket_credentials
acc_key_resp = client.create_access_key(
File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_validate_call.py", line 39, in wrapper_function
return wrapper(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_validate_call.py", line 136, in __call__
res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, kwargs))
File "/usr/local/lib/python3.10/dist-packages/stackit/objectstorage/api/default_api.py", line 139, in create_access_key
return self.api_client.response_deserialize(
File "/usr/local/lib/python3.10/dist-packages/stackit/objectstorage/api_client.py", line 275, in response_deserialize
return_data = self.deserialize(response_text, response_type, content_type)
File "/usr/local/lib/python3.10/dist-packages/stackit/objectstorage/api_client.py", line 363, in deserialize
return self.__deserialize(data, response_type)
File "/usr/local/lib/python3.10/dist-packages/stackit/objectstorage/api_client.py", line 408, in __deserialize
return self.__deserialize_model(data, klass)
File "/usr/local/lib/python3.10/dist-packages/stackit/objectstorage/api_client.py", line 626, in __deserialize_model
return klass.from_dict(data)
File "/usr/local/lib/python3.10/dist-packages/stackit/objectstorage/models/create_access_key_response.py", line 87, in from_dict
_obj = cls.model_validate(
File "/usr/local/lib/python3.10/dist-packages/pydantic/main.py", line 693, in model_validate
return cls.__pydantic_validator__.validate_python(
pydantic_core._pydantic_core.ValidationError: 1 validation error for CreateAccessKeyResponse
expires
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.11/v/string_type
I seems the "CreateAccessKeyPayload" accepts an "None" expiry date, which is allowed looing at the api docs, but the CreateAccessKeyResponse requires it the field to be a string and not None.
Using the same code but setting an "expires" allows me to create the key:
Hello,
I want to create a access key without an expiry. But I keep running into an pydantic problem.
I am running this code:
The error I am getting is:
I seems the "CreateAccessKeyPayload" accepts an "None" expiry date, which is allowed looing at the api docs, but the CreateAccessKeyResponse requires it the field to be a string and not None.
Using the same code but setting an "expires" allows me to create the key:
Asking for a fix. Kind regards, Sebastian
The text was updated successfully, but these errors were encountered: