Closed yaochang007 closed 7 years ago
Hi @yaochang007, If you want help or have some queries, please post that to https://discuss.erpnext.com/
Hi manassolanki,
I also posted on the forum, but I believe this is an issue, I update from ERPNext: v7.2.25, Frappe Framework: v7.2.20, My system has no customization, and all the git repository has been reset previously.
Hi,
Could you please comment the output of below from frappe bench console?
To open the frappe bench console
bench --site sitename console
Run this for command
print(frappe.local.module_app)
Hi, Below is the output:
[john@Full-20170605-1gb-sgp1-01 frappe-bench]$ bench --site site1.local console Python 2.7.5 (default, Nov 6 2016, 00:28:07) Type "copyright", "credits" or "license" for more information.
IPython 5.1.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details.
In [1]: print(frappe.local.module_app) {u'website': u'frappe', u'core': u'frappe', u'workflow': u'frappe', u'integrations': u'frappe', u'custom': u'frappe', u'printing': u'frappe', u'desk': u'frappe', u'geo': u'frappe', u'email': u'frappe'}
Hi manassolanki,
does it mean I don't have u'Accounts' App? How should I fix?
Somehow, your module def isn't created properly while you are installing the erpnext. Do you reinstall erpnext or haven't completed setup wizard properly?
Hi @yaochang007 , Any lead over this?
Hi manassolanki,
I use the simple installation method on github, all the setup is through the install.py script, and for configuration of the system, I just setup with minimum input.
@yaochang007 , Have you installed ERPNext on your site?
Hi @manassolanki ,
Yes, I have installed. The IP Address is 188.166.227.10
Could you please cross check once whether "Module Def" doctype has all the ERPNext module?
Hi @manassolanki
I have checked the module def, it got modules listed below:
Hi @manassolanki ,
Sorry, the last message didn't show them all.
@yaochang007 ,
Could you comment the output from this command in the console
print (frappe.get_all_apps(True))
print (frappe.get_module_list('erpnext'))
If you didn't get the module list as you have commented above then, please clear the cache using frappe.clear_cache()
and then retry again it will work.
@manassolanki ,
The result is as following:
In [1]: print (frappe.get_all_apps(True)) [u'frappe']
In [2]: print (frappe.get_module_list('erpnext')) [u'Accounts', u'CRM', u'Buying', u'Projects', u'Selling', u'Setup', u'HR', u'Manufacturing', u'Stock', u'Support', u'Utilities', u'Shopping Cart', u'Hub Node', u'Portal', u'Maintenance', u'Schools']
@yaochang007, The system is showing, you have installed only frappe app in your site. You must have deleted erpnext from apps.txt from your site manually or done some changes other changes manually which is causing this problem, please add erpnext in the app.txt or reinstall erpnext again. This will work fine then.
@manassolanki ,
Great, now it works.
But now it got another problem:
Executing frappe.patches.v8_0.set_currency_field_precision # 2017-05-09 in site1.local (1bd3e0294da19198)
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/john/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in
How to fix this?
Please update frappe and erpnext and then run bench migrate
For further resolution, you can create a discuss thread and we can continue there.
@manassolanki ,
Just now I tried to do migrate, but it got another problem..
[john@Full-20170605-1gb-sgp1-01 frappe-bench]$ bench migrate
Migrating site1.local
Executing frappe.patches.v8_0.set_currency_field_precision # 2017-05-09 in site1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.rename_print_to_printing in site1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.update_desktop_icons in site1.local (1bd3e0294da19198)
Success
Executing erpnext.patches.v8_0.move_perpetual_inventory_setting in site1.local (1bd3e0294da19198)
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/john/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in
@manassolanki .
I have created a new thread here.
Hi All,
I have an issue when I upgrade from V7 to V8, It will be really appreciated if anyone can help to solve it:
Backing up sites... Patching sites... Migrating site1.local Executing frappe.patches.v8_0.rename_page_role_to_has_role #2017-03-16 in site1.local (1bd3e0294da19198) Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 162, in runmodule_as_main "main", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in runcode exec code in run_globals File "/home/john/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in main() File "/home/john/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main click.Group(commands=commands)(prog_name='bench') File "/home/john/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 716, in call return self.main(args, kwargs) File "/home/john/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/home/john/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke return processresult(sub_ctx.command.invoke(sub_ctx)) File "/home/john/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke return processresult(sub_ctx.command.invoke(sub_ctx)) File "/home/john/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/john/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 534, in invoke return callback(args, kwargs) File "/home/john/frappe-bench/env/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, *kwargs) File "/home/john/frappe-bench/apps/frappe/frappe/commands/init.py", line 24, in _func ret = f(frappe._dict(ctx.obj), args, kwargs) File "/home/john/frappe-bench/apps/frappe/frappe/commands/site.py", line 214, in migrate migrate(context.verbose, rebuild_website=rebuild_website) File "/home/john/frappe-bench/apps/frappe/frappe/migrate.py", line 31, in migrate frappe.modules.patch_handler.run_all() File "/home/john/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all if not run_single(patchmodule = patch): File "/home/john/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single return execute_patch(patchmodule, method, methodargs) File "/home/john/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch frappe.get_attr(patchmodule.split()[0] + ".execute")() File "/home/john/frappe-bench/apps/frappe/frappe/patches/v8_0/rename_page_role_to_has_role.py", line 9, in execute frappe.rename_doc('DocType', 'Page Role', 'Has Role') File "/home/john/frappe-bench/apps/frappe/frappe/init.py", line 668, in rename_doc return rename_doc(*args, **kwargs) File "/home/john/frappe-bench/apps/frappe/frappe/model/rename_doc.py", line 46, in rename_doc update_link_field_values(link_fields, old, new, doctype) File "/home/john/frappe-bench/apps/frappe/frappe/model/rename_doc.py", line 160, in update_link_field_values single_doc = frappe.get_doc(field['parent']) File "/home/john/frappe-bench/apps/frappe/frappe/init.py", line 606, in get_doc return frappe.model.document.get_doc(arg1, arg2) File "/home/john/frappe-bench/apps/frappe/frappe/model/document.py", line 49, in get_doc controller = get_controller(doctype) File "/home/john/frappe-bench/apps/frappe/frappe/model/base_document.py", line 35, in get_controller module = load_doctype_module(doctype, module_name) File "/home/john/frappe-bench/apps/frappe/frappe/modules/utils.py", line 174, in load_doctype_module app = get_module_app(module) File "/home/john/frappe-bench/apps/frappe/frappe/modules/utils.py", line 197, in get_module_app return frappe.local.module_app[scrub(module)] KeyError: u'accounts'