There is a corner case when there is only 1 asset in an account. The code below from holdings.py expects a list in response but for only one asset it doesn't return a list.
def extract ( self, response ):
"""Extract certain fields from response
"""
response = response.json()['response']
holdings = response['accountholdings']['holding']
There is a corner case when there is only 1 asset in an account. The code below from holdings.py expects a list in response but for only one asset it doesn't return a list.
def extract ( self, response ): """Extract certain fields from response """ response = response.json()['response'] holdings = response['accountholdings']['holding']
The fix that I am doing locally is this to get over the issue.
def extract ( self, response ): """Extract certain fields from response """ response = response.json()['response'] holdings = response['accountholdings']['holding']