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
When trying to upload a W8BenDocument using UploadW8BenDocumentRequest two typing errors are rised.
The first one is because of type date not converted to string, the other is because of the type IPAddress not converted to string.
Expected Behavior
Date and IPAddress should be converted to string to make them json serializable
SDK Version I encountered this issue in
alpaca-py master
Steps To Reproduce
Currently date and IPAddress attributes are not converted to string. W8BenDocument has 2 date attributes: date and date_of_birth. Which causes this error:
requests.exceptions.InvalidJSONError: Object of type date is not JSON serializable
Fixing the issue described above, an other error is rised:
requests.exceptions.InvalidJSONError: Object of type IPv4Address is not JSON serializable
This other error is again because of the type IPAddress not converted to string.
You can reproduce the error on main branch using a broker_client and this request:
I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.
Anything else?
I've already fixed this, will push and create PR for feedback
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
When trying to upload a
W8BenDocument
usingUploadW8BenDocumentRequest
two typing errors are rised.The first one is because of type date not converted to string, the other is because of the type IPAddress not converted to string.
Expected Behavior
Date and IPAddress should be converted to string to make them json serializable
SDK Version I encountered this issue in
alpaca-py master
Steps To Reproduce
Currently date and IPAddress attributes are not converted to string. W8BenDocument has 2
date
attributes: date and date_of_birth. Which causes this error:requests.exceptions.InvalidJSONError: Object of type date is not JSON serializable
Fixing the issue described above, an other error is rised:
requests.exceptions.InvalidJSONError: Object of type IPv4Address is not JSON serializable
This other error is again because of the type IPAddress not converted to string.
You can reproduce the error on main branch using a broker_client and this request:
Filled out the Steps to Reproduce section?
Anything else?
I've already fixed this, will push and create PR for feedback
The text was updated successfully, but these errors were encountered: