Unfortunately we couldn’t make the app work…the app won’t even install on v11 at all which is where we have our production instance…
While on v12 orders won’t sync back into ERPNext…
Unfortunately we couldn’t make the app work…the app won’t even install on v11 at all which is where we have our production instance…
While on v12 orders won’t sync back into ERPNext…
Israel.l could you be more specific ?
What challenges did you have on v11 and what challenges did you have on v12
In my opinion your statement above is not helpful
Hi @EnSeal,
thanks for your feedback, sorry to hear that. We unfortunately no longer actively support v11, but on v12 it should in any case work. Do you have details, why the orders are not being pulled? There could be a cloud in the WooCommerce Log (sync started, …). If the connection works, items are synced, the sales order should also be able to be read…
@lasalesi does it sync inventory. Is sales invoice made in ERPNext or Sales order. Can you give more information of the 2 way functions.
I am on V12.7, python3.6 - getting the following error on bench --site erp.domain.com install-app woocommerceconnector
command:
ImportError: Module import failed for Asset Settings (erpnext.assets.doctype.asset_settings.asset_settings Error: No module named 'erpnext.assets.doctype.asset_settings.asset_settings')
Will appreciate any guidance on how to resolve. Thanks.
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py", line 204, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 827, in get_module
return importlib.import_module(modulename)
File "/home/frappe/frappe-bench/env/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'erpnext.assets.doctype.asset_settings.asset_settings'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
main()
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 179, in install_app
_install_app(app, verbose=context.verbose)
File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 85, in install_app
add_to_installed_apps(name)
File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 109, in add_to_installed_apps
post_install(rebuild_website)
File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 170, in post_install
init_singles()
File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 188, in init_singles
doc = frappe.new_doc(single)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 687, in new_doc
return get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py", line 21, in get_new_doc
frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py", line 39, in make_new_doc
"docstatus": 0
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 753, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 69, in get_doc
controller = get_controller(doctype)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 47, in get_controller
module = load_doctype_module(doctype, module_name)
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py", line 206, in load_doctype_module
raise ImportError('Module import failed for {0} ({1})'.format(doctype, module_name + ' Error: ' + str(e)))
ImportError: Module import failed for Asset Settings (erpnext.assets.doctype.asset_settings.asset_settings Error: No module named 'erpnext.assets.doctype.asset_settings.asset_settings')
Could fix it - dont know if it is right way - with following commands:
$ bench mariadb
> delete from `tabDocType` where `name` = "Asset Settings";
Was able to install-app after the above command. However bench update then fails / gives error:
ERROR: Command errored out with exit status 1:
command: /home/frappe/frappe-bench/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/frappe/frappe-bench/apps/woocommerceconnector/setup.py'"'"'; __file__='"'"'/home/frappe/frappe-bench/apps/woocommerceconnector/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-cpxffbnt
cwd: /home/frappe/frappe-bench/apps/woocommerceconnector/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/frappe/frappe-bench/apps/woocommerceconnector/setup.py", line 27, in <module>
install_requires=[str(ir.req) for ir in requirements],
File "/home/frappe/frappe-bench/apps/woocommerceconnector/setup.py", line 27, in <listcomp>
install_requires=[str(ir.req) for ir in requirements],
AttributeError: 'ParsedRequirement' object has no attribute 'req'
----------------------------------------
`ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.`
Uninstalled the app for the site and then did a bench remove-app
. Attempted to reinstall it. Get error on get-app command now. Seems cannot uninstall / remove app and reinstall it. Restored container from snapshot.
Appreciate any pointers.
I have this same error, can I ask how you solve this issue?
I have the same error trying to “get-app”
INFO:bench.app:installing woocommerceconnector
$ ./env/bin/pip install -q -U -e ./apps/woocommerceconnector
ERROR: Command errored out with exit status 1:
command: /opt/erpnext/erpnext/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/opt/erpnext/erpnext/apps/woocommerceconnector/setup.py'"'"'; __file__='"'"'/opt/erpnext/erpnext/apps/woocommerceconnector/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-doxlg29b
cwd: /opt/erpnext/erpnext/apps/woocommerceconnector/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/erpnext/erpnext/apps/woocommerceconnector/setup.py", line 27, in <module>
install_requires=[str(ir.req) for ir in requirements],
File "/opt/erpnext/erpnext/apps/woocommerceconnector/setup.py", line 27, in <listcomp>
install_requires=[str(ir.req) for ir in requirements],
AttributeError: 'ParsedRequirement' object has no attribute 'req'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
$ bench build --app woocommerceconnector
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/erpnext/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
main()
File "/opt/erpnext/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/opt/erpnext/erpnext/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/opt/erpnext/erpnext/env/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/opt/erpnext/erpnext/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/erpnext/erpnext/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/erpnext/erpnext/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/erpnext/erpnext/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/opt/erpnext/erpnext/apps/frappe/frappe/commands/utils.py", line 25, in build
frappe.init('')
File "/opt/erpnext/erpnext/apps/frappe/frappe/__init__.py", line 173, in init
setup_module_map()
File "/opt/erpnext/erpnext/apps/frappe/frappe/__init__.py", line 1015, in setup_module_map
for module in get_module_list(app):
File "/opt/erpnext/erpnext/apps/frappe/frappe/__init__.py", line 884, in get_module_list
return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), "modules.txt"))
File "/opt/erpnext/erpnext/apps/frappe/frappe/__init__.py", line 842, in get_module
return importlib.import_module(modulename)
File "/opt/erpnext/erpnext/env/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'woocommerceconnector'
Hi @zerodiscount,
sorry for the late response, but the “Asset Settings” issue is unrelated to WooCommerce…
The ‘req’ issue is a Python compatibility issue. I noted that the setup still had the old version code, this is now updated.
Thanks @lasalesi for the reply - better late than never… appreciate the contributions.
$ bench mariadb
> delete from `tabDocType` where `name` = "Asset Settings";
Is it ok to resolve the “Asset Settings” issue with above commands? Half knowledge is dangerous - and I dont know if above command will break other part of ERPNext . I did check - there is no category called Asset Settings in ERPNext - so is it something being called by your app?
@lasalesi - had another question related to functionality - will this app create a payment entry in ERPNext for orders that are paid in woocommerce (using woocommerce payment gateways)?
Asset Settings is a normal doctype:
When I checked on a v12.4 instance, this doctype is gone… So this must have been removed lately, and this causes your issue. But has nothing to do with the WooCommerce integration. From what I see, if you run v12.4 or later, it should be save to drop this table.
As far as I know, the connector does not sync the payment entries, but the sales invoices (in case of payment with the is_paid option).
@lasalesi - many thanks for the follow up. I was able to install the app and actually get sync to work partially / initially. Its sync’s IDs without issue and even synced a trial customer - which existed in erpnext - so it created a new one with a “-1”. Products in woocommerce were specified as a separate erpnext category. when I tried to get some regular erpnext product items to sync - i get the following error:
File "/home/frappe/frappe-bench/env/lib/python3.6/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: http://shop.domain.com/wp-json/wc/v3/products/607?oauth_consumer_key=ck_MY-Key_9c&oauth_timestamp=1588799441&oauth_nonce=123abc_Nonce_def&oauth_signature_method=HMAC-SHA256&oauth_signature=dT_MySignature_%3D
By this I meant - I check marked for items - sync quantity with woocommerce and also the other checkmark to sync item with woocommerce…
You can only sync stock once the connection between the item in WooCommerce and ERPNext is established. This should be the case, as you have synced the IDs… Have you tried to troubleshoot the URL if this has an issue (e.g. using Postman)?
You mean existing item from Woocommerce can sync to new item in ERPnext but not other way around? Tried unchecking the sync quantity with woocommerce, keeping the checkmark for sync item with woocommerce. it does not work/
Also FYI - items from 1 WooCommerce Category sync to ERPNext. The other category items do not sync with ID sync…
There might be a configuration issue at hand. Feel free to PM me to troubleshoot.
Trust you are doing very well
I got error message below while trying to sync sales order to ERPNext. Any
Traceback (most recent call last):
File “/home/frappe/bench12/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/bench12/apps/woocommerceconnector/woocommerceconnector/sync_products.py”, line 243, in sync_item_with_woocommerce
sync_item_image(erp_item)
File “/home/frappe/bench12/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/bench12/apps/woocommerceconnector/woocommerceconnector/woocommerce_requests.py”, line 69, in post_request
r.raise_for_status()
File “/home/frappe/bench12/env/lib/python3.8/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: http://xlweb.one/okearin/wp-json/wc/v3/products/280?oauth_consumer_key=ck_*******************************&oauth_timestamp=1588866575&oauth_nonce=ce**************************&oauth_signature_method=HMAC-SHA256&oauth_signature=wVW5SIDtxRrB31SLc***************************
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/frappe/bench12/apps/woocommerceconnector/woocommerceconnector/api.py”, line 41, in sync_woocommerce_resources
sync_products(woocommerce_settings.price_list, woocommerce_settings.warehouse)
File “/home/frappe/bench12/apps/woocommerceconnector/woocommerceconnector/sync_products.py”, line 19, in sync_products
sync_erpnext_items(price_list, warehouse, woocommerce_item_list)
File “/home/frappe/bench12/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’
This seems to be the same error as observed by @zerodiscount when trying to sync the items between WooCommerce and ERPNext. How is your configuration, can you sync the IDs? Do you have th items in ERPNext first and want to sync the to WooCommerce or the other way?
Yes i have the items in ERPNext first , which then syncs to the website.
Yes i can sync IDs but each time i use the sync ID it duplicates the item on the website.