```AttributeError: 'list' object has no attribute ...
# troubleshooting
i
Copy code
AttributeError: 'list' object has no attribute 'items'
So I'm getting this error for one of my API endpoints for my custom tap. Most endpoints come back as a list of dictionaries [["column_1_name": "column_1_value", "column_2_name": "column_2_value", etc...]], but this one comes back as a list of lists with the data as [["column_1_name", "column_2_name"],["column_1_value", "column_2_value"]]. Is that what may be causing this error? If so do I need to redeclare the
records_jsonpath
property for that particular stream?
e
If so do I need to redeclare the
records_jsonpath
property for that particular stream?
For that stream it might be easier to override RESTStream.parse_response than to figure out the right jsonpath expression 😅. Maybe
Copy code
def parse_response(self, response):
   data = response.json()
   field_names = data[0]
   for row in data[1:]:
       yield dict(zip(field_names, row))
or something like that
🙌 2
i
Cool I'll try that
👍 1