Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon sync failing #307

Open
daniel-sousa-me opened this issue Feb 19, 2024 · 0 comments
Open

Amazon sync failing #307

daniel-sousa-me opened this issue Feb 19, 2024 · 0 comments

Comments

@daniel-sousa-me
Copy link

daniel-sousa-me commented Feb 19, 2024

I'm trying to set up the Amazon integration, but when I click on "Sync Orders" I get the following error:

queue-long-1    | 2024-02-19 22:10:02,133 [Job erp.18xx.tools::24d12ce7-f297-4688-842b-d0768e01ef4c]: exception raised while executing (frappe.utils.background_jobs.execute_job)
queue-long-1    | Traceback (most recent call last):
queue-long-1    |   File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/rq/worker.py", line 1428, in perform_job
queue-long-1    |     rv = job.perform()
queue-long-1    |          ^^^^^^^^^^^^^
queue-long-1    |   File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/rq/job.py", line 1278, in perform                                queue-long-1    |     self._result = self._execute()                                                                                                  
queue-long-1    |                    ^^^^^^^^^^^^^^^
queue-long-1    |   File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/rq/job.py", line 1315, in _execute
queue-long-1    |     result = self.func(*self.args, **self.kwargs)
queue-long-1    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
queue-long-1    |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 213, in execute_job
queue-long-1    |     retval = method(**kwargs)
queue-long-1    |              ^^^^^^^^^^^^^^^^
queue-long-1    |   File "/home/frappe/frappe-bench/apps/ecommerce_integrations/ecommerce_integrations/amazon/doctype/amazon_sp_api_settings/amazon_repository.py", line 506, in get_orders
queue-long-1    |     return ar.get_orders(created_after)
queue-long-1    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
queue-long-1    |   File "/home/frappe/frappe-bench/apps/ecommerce_integrations/ecommerce_integrations/amazon/doctype/amazon_sp_api_settings/amazon_repository.py", line 464, in get_orders
queue-long-1    |     sales_order = self.create_sales_order(order)
queue-long-1    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
queue-long-1    |   File "/home/frappe/frappe-bench/apps/ecommerce_integrations/ecommerce_integrations/amazon/doctype/amazon_sp_api_settings/amazon_repository.py", line 394, in create_sales_order
queue-long-1    |     items = self.get_order_items(order_id)
queue-long-1    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
queue-long-1    |   File "/home/frappe/frappe-bench/apps/ecommerce_integrations/ecommerce_integrations/amazon/doctype/amazon_sp_api_settings/amazon_repository.py", line 289, in get_order_items
queue-long-1    |     "item_code": self.get_item_code(order_item),
queue-long-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
queue-long-1    |   File "/home/frappe/frappe-bench/apps/ecommerce_integrations/ecommerce_integrations/amazon/doctype/amazon_sp_api_settings/amazon_repository.py", line 269, in get_item_code
queue-long-1    |     item_code = self.create_item(order_item)
queue-long-1    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
queue-long-1    |   File "/home/frappe/frappe-bench/apps/ecommerce_integrations/ecommerce_integrations/amazon/doctype/amazon_sp_api_settings/amazon_repository.py", line 223, in create_item
queue-long-1    |     amazon_item = catalog_items.get_catalog_item(order_item["ASIN"])["payload"]
queue-long-1    |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
queue-long-1    | KeyError: 'payload'

What can I do to debug this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant