plaid/plaid-python

ApiTypeError when calling `asset_report_get`

roysohardy opened this issue · 5 comments

Hi, I keep getting this error when calling asset_report_get:

ApiTypeError: Invalid type for variable 'client_report_id'. Required value type is str and passed type was NoneType at ['received_data']['report']['client_report_id']

I'm using the Sandbox environment for some testings before moving to the Production environment. But this error stopped me from doing the tests. The asset_report_token is newly created and is working well in the Postman. Here is my code:

request = AssetReportGetRequest(asset_report_token='assets-sandbox-c6d249f4-d8f1-42ca-a0b2-48e0f8158b47')
response = client.asset_report_get(request)
report = response['report']

oops, this looks like a bug in the client libraries. we'll get this fixed. in the meantime, you should be able to work around it by supplying a value for client_report_id when creating your asset report

Thank you phoenixy1!
Would you please let me know how to get the client_report_id before pulling the asset report since this step is broken? The asset_report_token create step does not return that...
The reason I'm asking is that my script needs to be able to auto-generating the asset reports for a bunch of customers. So it would be best to make the process automatic without manually looking at some values.

The client report ID is an identifier you supply to /asset_report/create. It is determined by you and its value can be whatever you want.

Gotcha, thank you so much phoenixy1!

This issue has been fixed in code and the fix will be made available in the next release of the client libraries -- closing this issue for now.