question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'list' object has no attribute 'get'

See original GitHub issue

I am calling the get_order endpoint like this, api_response = orders_api.get_orders( CreatedAfter=created_after, CreatedBefore=created_before, NextToken=next_token, ) and it was working very well recently, but now when I call it, I get this error File "/mnt/c/Users/ayubz/Documents/Amazing Brand/amazon-due-diligence/logic/get_orders.py", line 49, in get_orders api_response = orders_api.get_orders( File "/home/zakir/.local/lib/python3.8/site-packages/sp_api/base/helpers.py", line 21, in wrapper return function(*args, **kwargs) File "/home/zakir/.local/lib/python3.8/site-packages/sp_api/api/orders/orders.py", line 51, in get_orders return self._request(kwargs.pop('path'), params={**kwargs}) File "/home/zakir/.local/lib/python3.8/site-packages/sp_api/base/client.py", line 114, in _request return self._check_response(res) File "/home/zakir/.local/lib/python3.8/site-packages/sp_api/base/client.py", line 118, in _check_response error = res.json().get('errors', None) AttributeError: 'list' object has no attribute 'get' Any idea why this might be happening?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
saleweavercommented, Mar 3, 2022

Ah nice. I was worried that the next token could cause this. Good it’s working!

0reactions
Zakir-Ayubcommented, Mar 3, 2022

@saleweaver Yes, you’re right, I had set the AWS_ENV from production to Sandbox by mistake, sorry. Its working now. Thanks for the fast response

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'list' object has no attribute 'X' in Python
The Python "AttributeError: 'list' object has no attribute" occurs when we access an attribute that doesn't exist on a list. To solve the...
Read more >
AttributeError: 'list' object has no attribute 'get'? - Stack Overflow
For the line device = device.get('ManualAdded', None) , I am getting the following error: AttributeError: 'list' object has no attribute 'get'.
Read more >
Solve AttributeError list object has no attribute replace in Python
Understanding the list object has no attribute replace error. Let us start by writing some simple code to reproduce the error. You can...
Read more >
AttributeError: 'list' object has no attribute 'get' #2579 - GitHub
The problem was with the stored tagger. I had stored the tagger as a file using a list of dict as a model...
Read more >
attributeerror: 'list' object has no attribute 'text' - You.com
The Python AttributeError: 'list' object has no attribute occurs when we access an attribute that doesn't exist on a list. To solve the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found