Thanks for all the efforts you’ve been giving to support this integration, here I have some troubles, hopefully you may have some way to know what’s going on
Current versions:
ERPNEXT V12.10.1
Frappe 12.8.3
Woocommerce 4.3.1
For now
‘Sync Woocommerce IDs to ERP’ duplicate products in draft in woocommerce every time you sync, ( all items with the sync to woocommerce check selected*).
Sync woocommerce ends in error:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/woocommerceconnector/woocommerceconnector/sync_products.py”, line 132, in sync_erpnext_items
sync_item_with_woocommerce(item, price_list, warehouse, woocommerce_item_list.get(item.get(‘woocommerce_product_id’)))
File “/home/frappe/frappe-bench/apps/woocommerceconnector/woocommerceconnector/sync_products.py”, line 243, in sync_item_with_woocommerce
sync_item_image(erp_item)
File “/home/frappe/frappe-bench/apps/woocommerceconnector/woocommerceconnector/sync_products.py”, line 270, in sync_item_image
post_request(“products/{0}”.format(item.woocommerce_product_id), image_info)
File “/home/frappe/frappe-bench/apps/woocommerceconnector/woocommerceconnector/woocommerce_requests.py”, line 69, in post_request
r.raise_for_status()
File “/home/frappe/frappe-bench/env/lib/python3.7/site-packages/requests/models.py”, line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://[[ WEBSITE LINK]]/wp-json/wc/v3/products/169
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/woocommerceconnector/woocommerceconnector/api.py”, line 41, in sync_woocommerce_resources
sync_products(woocommerce_settings.price_list, woocommerce_settings.warehouse)
File “/home/frappe/frappe-bench/apps/woocommerceconnector/woocommerceconnector/sync_products.py”, line 19, in sync_products
sync_erpnext_items(price_list, warehouse, woocommerce_item_list)
File “/home/frappe/frappe-bench/apps/woocommerceconnector/woocommerceconnector/sync_products.py”, line 139, in sync_erpnext_items
make_woocommerce_log(title=e.message, status=“Error”, method=“sync_woocommerce_items”, message=frappe.get_traceback(),
AttributeError: ‘HTTPError’ object has no attribute ‘message’
Also I wanted to ask, is there a way to sync pictures too?
Are you using the barcode field wo match the items? This is usually a rather stable way and should not give you double products. The bad request error occurs when you are trying to sync stock against an invalid product key in WooCommerce. Please check the WooCommerce Ids stored in ERPNext, you will find an ID that actually is not in WooCommerce (or a product that is set to sync stock but has no WooCommerce-ID).
The image function in WooCommerce is somewhat more powerful than in ERPNext, therefore, a simple sync of the images. However, the first image from WooCommerce should be synced to new items created in ERPNext. Is that what you are looking for (or the other way round)?
Yes I am using barcode fields, but is my first sync so I won’t have any products in WooCommerce end, Do I have to make a first product upload first maybe through CSV?
Does WooCommece also sync images? Currently we set images on WooCommerce website not on ERPNext. I get this error in ERPNext WooCom log however sync of all other information is perfectly fine.
Error Title WooCommerce post error 400
Message http://XXXXX/wp-json/wc/v3/products/5747?oauth_consumer_key=ck_cf06cbe4b9f0de1827cd4fb9fd2dd30c4f533efd&oauth_timestamp=1627214457&oauth_nonce=b1eb75bf4cab4484f30677db7a704d8fbd41da7f&oauth_signature_method=HMAC-SHA256&oauth_signature=7uTz5FazRywo6Ltb7weDWVBkfZ1L%2BUKCd2%2FiZPl3LnY%3D: {'code': 'woocommerce_product_image_upload_error', 'message': 'Error getting remote image https://woocom.com/files/CP_SMOKEGREEN%202020-10-12%2013:21:42.JPG. Error: cURL error 7: Failed to connect to woocom.com port 443: Connection refused', 'data': {'status': 400}}
Request Data {"images": [{"src": "https://woocom.com/files/CP_SMOKEGREEN 2020-10-12 13:21:42.JPG", "position": 0}]}
FYI we have not set SSL on WooComm yet but I see that message is showing https instead of http. This error is on all products. Kindly let me know what your thoughts are and where should I start to fix the issue. Thank you.
thanks for your message. Yes, images should also be synced from the WooCommerce image to ERPNext (mostly, pictures are rather in WooCommerce than ERPNext). It will only take the first (feature image) image…
The connector will always try to connect with https…
Thank you for the clarification. Now I get it. I have image on ERPNext as well as it is used for quotation and sales invoice print for retail (POS) and B2B sales. WooCommerce is 3rd sales channel.
So i guess the error is due to image already existing in ERPNext and image also coming in from WooCommerce site.
I guess the error message needs to be more self explanatory
We are in testing phase that’s why no domain yet or SSL. We are using IP. In production we will set domain and SSL.
One more issue we find is that if Item is ticked first without WooCommerce sync occuring and WooCommerce ID not being set then stock transfer to WooCommerce warehouse is not getting through. So we sync to get ID then it works fine. Else we make sure stock is transferred, price and description is set and then tick the 2 WooCommerce fields.
I am also getting this error. It did work at some point and then suddenly stopped. Maybe connected to a newer version of ERPNext. We really can’t identify that right now.
Mainly issue is from WooCommerce. Never could find which version works best. Have seen latest version to be fine while older version giving random issues which we never understood.