Performance Upgrade, moving slowing install to v9

Ok so while I’m updating to v9, I have just setup a clean v9 to get a feel, just created an item and it doesn’t show up ion pos, switched to form view, added back the item, can’t see it in pos view. Is there a new way to add items? Is sales item is checked, is pos profile compulsory to load items, I’ll try. pos view doesn’t load sometimes, until you reload browser page. It still feels like the offline pos… or does it not work well on safari on Mac? let me try Chrome,. wow

UPDATE Seems to work well on Chrome, but sometimes screen is blank with just Point of Sale title until you reload.

PLEASE HELP, ERPNEXT AND FRAPPE ON V9.20 BUT UPDATE IS STUCK AND I HAVE INTERNAL SERVER ERROR

if doc.restrict_to_domain and not frappe.db.exists(‘Domain’, doc.restrict_to_domain):
AttributeError: ‘DocType’ object has no attribute ‘restrict_to_domain’


frappe@erpnext:~/frappe-bench$ bench version
erpnext 9.2.0
frappe 9.2.0

PLEASE HELP, ERPNEXT AND FRAPPE ON V9.20 BUT UPDATE IS STUCK AND I HAVE INTERNAL SERVER ERROR

if doc.restrict_to_domain and not frappe.db.exists(‘Domain’, doc.restrict_to_domain):
AttributeError: ‘DocType’ object has no attribute ‘restrict_to_domain’


frappe@erpnext:~/frappe-bench$ bench version
erpnext 9.2.0
frappe 9.2.0

You can force the update by doing the following -

edit the following file - erpnext/patches.txt

comment out the following line - erpnext.patches.v8_3.set_restrict_to_domain_for_module_def

that should get you past the update error as I believe it is trying to apply the patch.

Not sure what how it will affect the upgrade, but at least you can get past the error.

Good Luck.

Thanks Sir. will try that now, what about this?

frappe@erpnext:~/frappe-bench$ bench migrate
Migrating erpnext.vm
Executing frappe.patches.v7_1.rename_scheduler_log_to_error_log in erpnext.vm (d56cb677ea)
Success
Executing frappe.patches.v7_0.re_route #2016-06-27 in erpnext.vm (d56cb677ea)
Success
Executing frappe.patches.v7_2.remove_in_filter in erpnext.vm (d56cb677ea)
Success
Executing frappe.patches.v8_0.drop_in_dialog #2017-09-22 in erpnext.vm (d56cb677ea)
Success
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘doctype’, force=True) #2017-09-22 in erpnext.vm (d56cb677ea)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
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/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/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 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 217, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, in migrate
frappe.modules.patch_handler.run_all()
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 81, in execute_patch
exec(patchmodule.split(“execute:”)[1],globals())
File “”, line 1, in
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 691, in reload_doc
return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 145, in reload_doc
return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 19, in import_files
reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 24, in import_file
ret = import_file_by_path(path, force, pre_process=pre_process, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 58, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 131, in import_doc
doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 230, in insert
self.db_insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 299, in db_insert
), list(d.values()))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 152, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/src/mysqlclient/MySQLdb/cursors.py”, line 250, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/src/mysqlclient/MySQLdb/connections.py”, line 50, in defaulterrorhandler
raise errorvalue
_mysql_exceptions.OperationalError: (1054, “Unknown column ‘in_dialog’ in ‘field list’”)

Although I passed that by doing the ALTER TABLE part from this and then I got to this new error I posted previously:

ok, added in_dialog to doctype using alter table, its progressing now…

ok I think I’m really close to getting this v6 updated to 9, another error occurred:

@H_N can I skip?

Executing frappe.patches.v6_21.print_settings_repeat_header_footer in erpnext.vm (d56cb677ea)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
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/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/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 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 217, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, in migrate
frappe.modules.patch_handler.run_all()
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/frappe/frappe-bench/apps/frappe/frappe/patches/v6_21/print_settings_repeat_header_footer.py”, line 5, in execute
frappe.reload_doctype(‘Print Settings’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 679, in reload_doctype
force=force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 691, in reload_doc
return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 145, in reload_doc
return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 19, in import_files
reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 23, in import_file
path = get_file_path(module, dt, dn)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 30, in get_file_path
path = os.path.join(get_module_path(module),
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 137, in get_module_path
return frappe.get_module_path(module)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 716, in get_module_path
return get_pymodule_path(local.module_app[module] + “.” + module, *joins)
KeyError: u’print’

You have nothing to lose. Go ahead and skip.

Thanks so much; I’ve skipped a few things here and there, like the desktop_icons parts; will that have an effect on desk display? That table didn’t exist at all in the earlier version tabDesktop Icons

return get_pymodule_path(local.module_app[module] + “.” + module, *joins) KeyError: u’print’

in the system system, did you customize and create a doctype named print that wasn’t linked to any module?

The final patches are being installed, I really hope skipping the desktop icons wasn’t a bad move, else will have to create the table and try running those patches if the desktop becomes unstable as per icons.

I don’t remember doing this Sir… any way I skipped some lol. What do you think about skipping the desktop icons?

skipping patches is not a good idea since there were many database structure changes especially between v6 and v7

Alright, after this run, I’ll uncomment and rerun, in the case of this desktop icons table that didn’t ever exist, do I have to manually create? the scripts cannot create this database? Can bench update --patch fix it?

what is the patch name that you skipped?

These…

#erpnext.patches.v6_24.set_recurring_id
#erpnext.patches.v6_20x.set_compact_print
#erpnext.patches.v7_0.remove_features_setup
#frappe.patches.v6_21.print_settings_repeat_header_footer
#finally:frappe.patches.v6_24.sync_desktop_icons
#frappe.patches.v7_0.desktop_icons_hidden_by_admin_as_blocked
#execute:frappe.db.sql(“delete from tabDesktop Icon where module_name=‘Communication’”)
#execute:frappe.db.sql(“update tabDesktop Icon set type=‘list’ where _doctype=‘Communication’”)
#frappe.patches.v8_0.fix_non_english_desktop_icons # 2017-04-12
#frappe.patches.v8_0.update_desktop_icons

error examples:

aise_exception(encode(msg))
frappe.exceptions.ValidationError: Options must be a valid DocType for field Print Style in row 16

raise errorvalue

_mysql_exceptions.OperationalError: (1054, “Unknown column ‘submit_on_creation’ in ‘field list’”)

You can try this to rebuild your desktop icons.

bench --site site-name reload-doc desk doctype desktop_icon

O great, that’s after the patches right? because it’s still on, the data is truly large. Thanks.