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
importrequestsAPI_KEY=""DOCUMENT_ID=""# same template as the previous exampleheaders= {
"Content-Type": "application/json",
"Authorization": f"API-Key {API_KEY}"
}
url="https://api.pandadoc.com/"+f"public/v1/documents/{DOCUMENT_ID}/send"res=requests.get(url, headers=headers)
document_sent_response_dict=res.json()
Impact:
Because of this library behavior, I can't implement the feature of sending the document to the set of recipients defined during its creation using the SDK. Even though they receive the document, the method throws the below error:
{
"message": "An unexpected error occurred.",
"errors": "Invalid type for variable 'expiration_date'. Required value type is str and passed type was NoneType at ['received_data']['expiration_date']"
}
Steps to Reproduce:
Set up the PandaDoc Python SDK using the API key and document ID.
Create a document using a reference template with a set of recipients and send it with "expiration_date" as None, as it can't be set using the SDK.
Observe the error raised by the SDK.
Expected Behavior:
The SDK should handle None values for fields that might be unknown or optional, similar to the behavior when using the requests library.
Actual Behavior:
The SDK raises an error when encountering None values for "expiration_date".
Environment:
Operating System: Ubuntu 20.04
Python Version: 3.11
PandaDoc Python SDK Version: 6.2.0
Additional Context: Handling None values gracefully in the SDK would improve its usability and prevent unexpected errors, aligning its behavior with direct API calls using the requests library.
The text was updated successfully, but these errors were encountered:
When using the SDK to send documents, an error is raised if "expiration_date" is None. This does not occur when using the
requests
library.Example with SDK:
Raises:
Example with GET:
Impact:
Because of this library behavior, I can't implement the feature of sending the document to the set of recipients defined during its creation using the SDK. Even though they receive the document, the method throws the below error:
Steps to Reproduce:
Expected Behavior:
The SDK should handle None values for fields that might be unknown or optional, similar to the behavior when using the requests library.
Actual Behavior:
The SDK raises an error when encountering None values for "expiration_date".
Environment:
requests
library.The text was updated successfully, but these errors were encountered: