Open daniel-sousa-me opened 9 months ago
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?
I'm trying to set up the Amazon integration, but when I click on "Sync Orders" I get the following error:
What can I do to debug this?