Skip to content

Instantly share code, notes, and snippets.

@nuco
Created August 8, 2014 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuco/796edda579cb4f360f99 to your computer and use it in GitHub Desktop.
Save nuco/796edda579cb4f360f99 to your computer and use it in GitHub Desktop.
nuco@ERPN:~$ cd frappe-bench/
nuco@ERPN:~/frappe-bench$ bench migrate-3to4 /home/erpnext/erpnext
/home/erpnext/erpnext/public
Executing execute:frappe.db.sql("""update `tabPatch Log` set patch=replace(patch, '.4_0.', '.v4_0.')""") #2014-05-12 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'doctype', force=True) #2014-01-24 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'docfield', force=True) #2014-03-01 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'docperm') #2014-06-04 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'page') #2013-13-26 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'report') #2014-06-03 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'version') #2014-02-21 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'email_alert') #2014-07-15 in erpnext (ERP)
Success
Executing execute:frappe.db.sql("alter table `tabSessions` modify `user` varchar(255), engine=InnoDB") in erpnext (ERP)
Success
Executing execute:frappe.db.sql("delete from `tabDocField` where parent='0'") in erpnext (ERP)
Success
Executing frappe.patches.v4_0.change_varchar_length in erpnext (ERP)
Success
Executing frappe.patches.v4_0.webnotes_to_frappe in erpnext (ERP)
Success
Executing execute:frappe.reset_perms("Module Def") in erpnext (ERP)
Success
Executing execute:import frappe.installer;frappe.installer.make_site_dirs() #2014-02-19 in erpnext (ERP)
Success
Executing frappe.patches.v4_0.rename_profile_to_user in erpnext (ERP)
Success
Executing frappe.patches.v4_0.deprecate_control_panel in erpnext (ERP)
Success
Executing frappe.patches.v4_0.remove_old_parent in erpnext (ERP)
Success
Executing frappe.patches.v4_0.rename_sitemap_to_route in erpnext (ERP)
Success
Executing frappe.patches.v4_0.website_sitemap_hierarchy in erpnext (ERP)
Success
Executing frappe.patches.v4_0.remove_index_sitemap in erpnext (ERP)
Success
Executing frappe.patches.v4_0.set_website_route_idx in erpnext (ERP)
Success
Executing frappe.patches.v4_0.add_delete_permission in erpnext (ERP)
Success
Executing frappe.patches.v4_0.set_todo_checked_as_closed in erpnext (ERP)
Success
Executing frappe.patches.v4_0.private_backups in erpnext (ERP)
Success
Executing frappe.patches.v4_0.set_module_in_report in erpnext (ERP)
Success
Executing frappe.patches.v4_0.update_datetime in erpnext (ERP)
Success
Executing frappe.patches.v4_0.file_manager_hooks in erpnext (ERP)
Warning: Error processing FileData-00002
Warning: Error processing FileData-00003
Success
Executing execute:frappe.get_doc("User", "Guest").save() in erpnext (ERP)
Success
Executing frappe.patches.v4_0.update_custom_field_insert_after in erpnext (ERP)
Success
Executing frappe.patches.v4_0.deprecate_link_selects in erpnext (ERP)
Success
Executing frappe.patches.v4_0.set_user_gravatar in erpnext (ERP)
Success
Executing frappe.patches.v4_0.set_user_permissions in erpnext (ERP)
Success
Executing frappe.patches.v4_0.create_custom_field_for_owner_match in erpnext (ERP)
Success
Executing frappe.patches.v4_0.enable_scheduler_in_system_settings in erpnext (ERP)
Success
Executing execute:frappe.db.sql("update tabReport set apply_user_permissions=1") #2014-06-03 in erpnext (ERP)
Success
Executing frappe.patches.v4_0.replace_deprecated_timezones in erpnext (ERP)
Success
Executing execute:import frappe.website.render; frappe.website.render.clear_cache("login"); #2014-06-10 in erpnext (ERP)
Success
Executing frappe.patches.v4_0.fix_attach_field_file_url in erpnext (ERP)
Success
Executing execute:frappe.reset_perms("User") #2014-06-13 in erpnext (ERP)
Success
Executing execute:frappe.db.sql("""delete from `tabUserRole` where ifnull(parentfield, '')=''""") #2014-06-17 in erpnext (ERP)
Success
Executing frappe.patches.v4_0.remove_user_owner_custom_field in erpnext (ERP)
Success
Executing execute:frappe.delete_doc("DocType", "Website Template") in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('website', 'doctype', 'website_route') #2014-06-17 in erpnext (ERP)
Success
Executing execute:frappe.db.sql("""update `tabProperty Setter` set property_type='Text' where property in ('options', 'default')""") #2014-06-20 in erpnext (ERP)
Success
Executing frappe.patches.v4_1.enable_outgoing_email_settings in erpnext (ERP)
Success
Executing execute:frappe.db.sql("""update `tabSingles` set `value`=`doctype` where `field`='name'""") #2014-07-04 in erpnext (ERP)
Success
Executing frappe.patches.v4_1.enable_print_as_pdf #2014-06-17 in erpnext (ERP)
Success
Executing execute:frappe.db.sql("""update `tabDocPerm` set email=1 where parent='User' and permlevel=0 and `role`='All' and `read`=1 and apply_user_permissions=1""") #2014-07-15 in erpnext (ERP)
Success
Executing execute:frappe.db.sql("""update `tabPrint Format` set print_format_type='Client' where ifnull(print_format_type, '')=''""") #2014-07-28 in erpnext (ERP)
Success
Executing frappe.patches.v4_1.file_manager_fix in erpnext (ERP)
Warning: Error processing FileData-00002
Warning: Error processing FileData-00003
Success
Executing frappe.patches.v4_2.print_with_letterhead in erpnext (ERP)
Success
Executing execute:import unidecode # new requirement in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.validate_v3_patch in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.fix_employee_user_id in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.remove_employee_role_if_no_employee in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.update_user_properties in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.apply_user_permissions in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.move_warehouse_user_to_restrictions in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.global_defaults_to_system_settings in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.update_incharge_name_to_sales_person_in_maintenance_schedule in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('accounts', 'doctype', 'sales_invoice') # 2014-01-29 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('selling', 'doctype', 'sales_order') # 2014-01-29 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('selling', 'doctype', 'quotation') # 2014-01-29 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('stock', 'doctype', 'delivery_note') # 2014-01-29 in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.reload_sales_print_format in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('accounts', 'doctype', 'purchase_invoice') # 2014-01-29 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('buying', 'doctype', 'purchase_order') # 2014-01-29 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('buying', 'doctype', 'supplier_quotation') # 2014-01-29 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('stock', 'doctype', 'purchase_receipt') # 2014-01-29 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('accounts', 'doctype', 'pos_setting') # 2014-01-29 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('selling', 'doctype', 'customer') # 2014-01-29 in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('buying', 'doctype', 'supplier') # 2014-01-29 in erpnext (ERP)
Success
Executing erpnext.patches.v4_0.map_charge_to_taxes_and_charges in erpnext (ERP)
Success
Executing execute:frappe.reload_doc('support', 'doctype', 'newsletter') # 2014-01-31 in erpnext (ERP)
Traceback (most recent call last):
File "/home/nuco/bench-repo/bench/migrate3to4.py", line 98, in <module>
main(args.site)
File "/home/nuco/bench-repo/bench/migrate3to4.py", line 38, in main
migrate(site)
File "/home/nuco/bench-repo/bench/migrate3to4.py", line 78, in migrate
latest()
File "/home/nuco/frappe-bench/apps/frappe/frappe/cli.py", line 67, in new_fn
return fn(*args, **new_kwargs)
File "/home/nuco/frappe-bench/apps/frappe/frappe/cli.py", line 420, in latest
frappe.modules.patch_handler.run_all()
File "/home/nuco/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
if not run_single(patchmodule = patch):
File "/home/nuco/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 50, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/home/nuco/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 64, in execute_patch
exec patchmodule.split("execute:")[1] in globals()
File "<string>", line 1, in <module>
File "/home/nuco/frappe-bench/apps/frappe/frappe/__init__.py", line 364, in reload_doc
return frappe.modules.reload_doc(module, dt, dn, force=force)
File "/home/nuco/frappe-bench/apps/frappe/frappe/modules/__init__.py", line 35, in reload_doc
return import_files(module, dt, dn, force=force)
File "/home/nuco/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 17, in import_files
return import_file(module, dt, dn, force=force)
File "/home/nuco/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 22, in import_file
ret = import_file_by_path(path, force)
File "/home/nuco/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 50, in import_file_by_path
import_doc(doc, force=force)
File "/home/nuco/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 111, in import_doc
doc.insert()
File "/home/nuco/frappe-bench/apps/frappe/frappe/model/document.py", line 153, in insert
self.run_post_save_methods()
File "/home/nuco/frappe-bench/apps/frappe/frappe/model/document.py", line 427, in run_post_save_methods
self.run_method("on_update")
File "/home/nuco/frappe-bench/apps/frappe/frappe/model/document.py", line 400, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File "/home/nuco/frappe-bench/apps/frappe/frappe/model/document.py", line 476, in composer
return composed(self, method, *args, **kwargs)
File "/home/nuco/frappe-bench/apps/frappe/frappe/model/document.py", line 459, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/nuco/frappe-bench/apps/frappe/frappe/model/document.py", line 394, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/nuco/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 100, in on_update
module = load_doctype_module(self.name, self.module)
File "/home/nuco/frappe-bench/apps/frappe/frappe/modules/__init__.py", line 57, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(get_module_name(doctype, module, prefix))
File "/home/nuco/frappe-bench/apps/frappe/frappe/__init__.py", line 375, in get_module
return importlib.import_module(modulename)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/nuco/frappe-bench/apps/erpnext/erpnext/support/doctype/newsletter/newsletter.py", line 11, in <module>
import erpnext.tasks
File "/home/nuco/frappe-bench/apps/erpnext/erpnext/tasks.py", line 8, in <module>
@celery_task()
File "/home/nuco/frappe-bench/apps/frappe/frappe/celery_app.py", line 85, in celery_task
return get_celery().task(*args, **kwargs)
File "/home/nuco/frappe-bench/apps/frappe/frappe/celery_app.py", line 34, in get_celery
setup_celery(_app, conf)
File "/home/nuco/frappe-bench/apps/frappe/frappe/celery_app.py", line 40, in setup_celery
sites_path=SITES_PATH))
File "/home/nuco/frappe-bench/apps/frappe/frappe/__init__.py", line 404, in get_all_apps
apps = get_file_items(os.path.join(sites_path, "apps.txt"), raise_not_found=True)
File "/home/nuco/frappe-bench/apps/frappe/frappe/__init__.py", line 489, in get_file_items
content = read_file(path, raise_not_found=raise_not_found)
File "/home/nuco/frappe-bench/apps/frappe/frappe/__init__.py", line 508, in read_file
raise IOError("{} Not Found".format(path))
IOError: ./apps.txt Not Found
Error: None
Traceback (most recent call last):
File "/usr/local/bin/bench", line 9, in <module>
load_entry_point('bench==0.1', 'console_scripts', 'bench')()
File "/home/nuco/bench-repo/bench/cli.py", line 26, in cli
return bench()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 488, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 474, in main
self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 758, in invoke
return self.invoke_subcommand(ctx, cmd, cmd_name, ctx.args[1:])
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 767, in invoke_subcommand
return cmd.invoke(cmd_ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 659, in invoke
ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 325, in invoke
return callback(*args, **kwargs)
File "/home/nuco/bench-repo/bench/cli.py", line 123, in migrate_3to4
site=path))
File "/home/nuco/bench-repo/bench/utils.py", line 56, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'env/bin/python /home/nuco/bench-repo/bench/migrate3to4.py /home/erpnext/erpnext' returned non-zero exit status 1
nuco@ERPN:~/frappe-bench$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment