Hi,
We are using ERPNext in Self hosted server, Current version is as below, but we need to update to version 8,
how can we update . ??
we have tied bench update , but error are occurred.
ERPNext: v7.2.19
Frappe Framework: v7.2.15
Hi,
We are using ERPNext in Self hosted server, Current version is as below, but we need to update to version 8,
how can we update . ??
we have tied bench update , but error are occurred.
ERPNext: v7.2.19
Frappe Framework: v7.2.15
Please share what error occurred while updating the ERPNext.
Also, to upgrade from version 7 to version 8 please use the following command
bench update --upgrade
please take the database backup before running bench update command
[root@localhost frappe-bench]# bench update --upgrade
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
Cannot proceed with update: You have local changes in app “frappe” that are not committed.
Here are your choices:
@dineshpanchal432
You have made some changes in frappe app ,you need to add these changes then commit .
then try bench update
Hi @dineshpanchal432! If you didn’t change anything in the frappe application, you can do the following:
git reset --hard
bench update --upgrade
If ERPNext prompts with the same error (and you haven’t edited anything in erpnext), just do the same steps. Do git reset --hard
inside the apps/erpnext folder and try to run update again.
Cheers!
Hera
how do i commit these changes ?
@ci2016 thank but no it gives me error on permission
nothing added to commit but untracked files present (use “git add” to track)
[root@localhost erpnext]# git add --all
[root@localhost erpnext]# git stash
Saved working directory and index state WIP on master: efd5ead Merge branch ‘hotfix’
HEAD is now at efd5ead Merge branch ‘hotfix’
[root@localhost erpnext]# bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream master
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript
Note: Repost from other post, since a lot of people have this problem. Please use the following instructions 1-7. It will work for sure:
I am close to a solution. Actually, I found a solution already.
git status
git add --all
to track those filesgit stash
bench update
On this point you’re already done, but you may want to apply your changes, which you stashed. So continue with 8. if you stashed things, which you consider important.
8 . While you’re still in the folder, either frappe-bench/apps/erpnext or frappe-bench/apps/frappe type git stash apply
Your changes will be applied again, but on the next run, you will run into the same issue like you had before.
So 1. - 7. was the solution we were looking for.
Maybe someone can tell, why “print formats” and “support/web forms” are breaking bench update. These are my files:
erpnext/accounts/print_format/nameofsomeguy/__init__.py
erpnext/accounts/print_format/nameofsomeguy/nameofsomeguy.json
erpnext/accounts/print_format/nameofsomeotherguy/__init__.py
erpnext/accounts/print_format/nameofsomeotherguy/nameofsomeotherguy.json
erpnext/support/web_form/contact/__init__.py
erpnext/support/web_form/contact/contact.js
erpnext/support/web_form/contact/contact.json
erpnext/support/web_form/contact/contact.py
I see that you run everything as root and still have permission errors.
Go to the folder ~/frappe-bench/apps/ and post the output of the following command, so we see your file permissions and ownership.
ls -l
This update will cause a major version change in Frappe/ERPNext from 7 to 8.
This would take significant time to migrate and might break custom apps. Please run bench update --upgrade
to confirm.
()
You can stay on the latest stable release by running bench switch-to-master
or pin your bench to 7 by running bench switch-to-v7
│ ├─┬ send@0.15.3
│ │ ├── debug@2.6.7
│ │ └── http-errors@1.6.1
│ ├── serve-static@1.12.3
│ ├── setprototypeof@1.0.3
│ ├─┬ type-is@1.6.15
│ │ └─┬ mime-types@2.1.15
│ │ └── mime-db@1.27.0
│ └── vary@1.1.1
├─┬ less@2.7.2
│ ├─┬ errno@0.1.4
│ │ └── prr@0.0.0
│ ├── graceful-fs@4.1.11
│ ├── image-size@0.5.5
│ └─┬ promise@7.3.1
│ └── asap@2.0.5
├─┬ nightwatch@0.9.16
│ ├─┬ chai-nightwatch@0.1.1
│ │ ├── assertion-error@1.0.0
│ │ └─┬ deep-eql@0.1.3
│ │ └── type-detect@0.1.1
│ ├── ejs@0.8.3
│ ├─┬ lodash.clone@3.0.3
│ │ ├─┬ lodash._baseclone@3.3.0
│ │ │ ├── lodash._arraycopy@3.0.0
│ │ │ ├── lodash._arrayeach@3.0.0
│ │ │ ├─┬ lodash._baseassign@3.2.0
│ │ │ │ └── lodash._basecopy@3.0.1
│ │ │ ├── lodash._basefor@3.0.3
│ │ │ ├── lodash.isarray@3.0.4
│ │ │ └─┬ lodash.keys@3.1.2
│ │ │ ├── lodash._getnative@3.9.1
│ │ │ └── lodash.isarguments@3.1.0
│ │ ├── lodash._bindcallback@3.0.1
│ │ └── lodash._isiterateecall@3.0.9
│ ├─┬ lodash.defaultsdeep@4.3.2
│ │ ├── lodash._baseclone@4.5.7
│ │ ├── lodash._stack@4.1.3
│ │ ├── lodash.keysin@4.2.0
│ │ ├── lodash.mergewith@4.6.0
│ │ └── lodash.rest@4.0.5
│ ├── minimatch@3.0.3
│ ├── mkpath@1.0.0
│ ├─┬ mocha-nightwatch@3.2.2
│ │ ├── browser-stdout@1.3.0
│ │ ├─┬ commander@2.9.0
│ │ │ └── graceful-readlink@1.0.1
│ │ ├─┬ debug@2.2.0
│ │ │ └── ms@0.7.1
│ │ ├── diff@1.4.0
│ │ ├── escape-string-regexp@1.0.5
│ │ ├── glob@7.0.5
│ │ ├── growl@1.9.2
│ │ ├── json3@3.3.2
│ │ ├─┬ lodash.create@3.1.1
│ │ │ └── lodash._basecreate@3.0.3
│ │ └─┬ supports-color@3.1.2
│ │ └── has-flag@1.0.0
│ ├─┬ optimist@0.6.1
│ │ └── wordwrap@0.0.3
│ ├─┬ proxy-agent@2.0.0
│ │ ├─┬ agent-base@2.1.1
│ │ │ └── semver@5.0.3
│ │ ├── http-proxy-agent@1.0.0
│ │ ├── https-proxy-agent@1.0.0
│ │ ├── lru-cache@2.6.5
│ │ ├─┬ pac-proxy-agent@1.1.0
│ │ │ ├─┬ get-uri@2.0.0
│ │ │ │ ├── data-uri-to-buffer@0.0.4
│ │ │ │ ├── file-uri-to-path@0.0.2
│ │ │ │ └─┬ ftp@0.3.10
│ │ │ │ ├─┬ readable-stream@1.1.14
│ │ │ │ │ ├── isarray@0.0.1
│ │ │ │ │ └── string_decoder@0.10.31
│ │ │ │ └── xregexp@2.0.0
│ │ │ ├─┬ pac-resolver@2.0.0
│ │ │ │ ├── co@3.0.6
│ │ │ │ ├─┬ degenerator@1.0.4
│ │ │ │ │ ├── ast-types@0.9.12
│ │ │ │ │ ├─┬ escodegen@1.8.1
│ │ │ │ │ │ ├── esprima@2.7.3
│ │ │ │ │ │ ├── estraverse@1.9.3
│ │ │ │ │ │ ├─┬ optionator@0.8.2
│ │ │ │ │ │ │ ├── deep-is@0.1.3
│ │ │ │ │ │ │ ├── fast-levenshtein@2.0.6
│ │ │ │ │ │ │ ├── levn@0.3.0
│ │ │ │ │ │ │ ├── prelude-ls@1.1.2
│ │ │ │ │ │ │ ├── type-check@0.3.2
│ │ │ │ │ │ │ └── wordwrap@1.0.0
│ │ │ │ │ │ └─┬ source-map@0.2.0
│ │ │ │ │ │ └── amdefine@1.0.1
│ │ │ │ │ └── esprima@3.1.3
│ │ │ │ ├── ip@1.0.1
│ │ │ │ ├── netmask@1.0.6
│ │ │ │ └── thunkify@2.1.2
│ │ │ └─┬ raw-body@2.2.0
│ │ │ ├── bytes@2.4.0
│ │ │ └── iconv-lite@0.4.15
│ │ └─┬ socks-proxy-agent@2.1.1
│ │ └─┬ socks@1.1.10
│ │ ├── ip@1.1.5
│ │ └── smart-buffer@1.1.15
│ └── q@1.4.1
├─┬ redis@2.7.1
│ └── redis-parser@2.6.0
└─┬ superagent@3.5.2
├── cookiejar@2.1.1
├── extend@3.0.1
├── form-data@2.1.4
└─┬ readable-stream@2.3.3
├── safe-buffer@5.1.1
└─┬ string_decoder@1.0.3
└── safe-buffer@5.1.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/ch okidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”} )
npm WARN frappe@ No description
Reloading bench…
Backing up sites…
Patching sites…
Migrating site1.local
Executing execute:frappe.utils.global_search.setup_global_search_table() in site 1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.update_global_search_table in site1.local (1bd3e02 94da19198)
Success
Executing frappe.patches.v7_2.remove_in_filter in site1.local (1bd3e0294da19198)
Success
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘doctype’, force=True) #2 017-03-09 in site1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.drop_in_dialog in site1.local (1bd3e0294da19198)
Success
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘docfield’, force=True) # 2017-03-03 in site1.local (1bd3e0294da19198)
Success
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘docperm’) #2017-03-03 in site1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.drop_is_custom_from_docperm in site1.local (1bd3e0 294da19198)
Success
Executing frappe.patches.v8_0.update_records_in_global_search #11-05-2017 in sit e1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.update_published_in_global_search in site1.local ( 1bd3e0294da19198)
Success
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘custom_docperm’) in site 1.local (1bd3e0294da19198)
Success
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘deleted_document’) in si te1.local (1bd3e0294da19198)
Success
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘version’) #2017-04-01 in site1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.rename_page_role_to_has_role #2017-03-16 in site1. local (1bd3e0294da19198)
Success
Executing frappe.patches.v7_2.setup_custom_perms #2017-01-19 in site1.local (1bd 3e0294da19198)
Success
Executing frappe.patches.v8_0.set_user_permission_for_page_and_report #2017-03-2 0 in site1.local (1bd3e0294da19198)
Success
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘role’) #2017-05-23 in si te1.local (1bd3e0294da19198)
Success
Executing execute:frappe.core.doctype.language.language.update_language_names() # 2017-04-12 in site1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.drop_unwanted_indexes in site1.local (1bd3e0294da1 9198)
Success
Executing execute:frappe.db.sql(“update tabCommunication set communication_date = creation where time(communication_date) = 0”) in site1.local (1bd3e0294da19198 )
Success
Executing frappe.patches.v7_2.fix_email_queue_recipient in site1.local (1bd3e029 4da19198)
Success
Executing frappe.patches.v7_2.update_feedback_request # 2017-02-27 in site1.loca l (1bd3e0294da19198)
Success
Executing execute:frappe.rename_doc(‘Country’, ‘Macedonia, Republic of’, ‘Macedo nia’, ignore_if_exists=True) in site1.local (1bd3e0294da19198)
Success
Executing execute:frappe.rename_doc(‘Country’, ‘Iran, Islamic Republic of’, ‘Ira n’, ignore_if_exists=True) in site1.local (1bd3e0294da19198)
Success
Executing execute:frappe.rename_doc(‘Country’, ‘Tanzania, United Republic of’, ’ Tanzania’, ignore_if_exists=True) in site1.local (1bd3e0294da19198)
Success
Executing execute:frappe.rename_doc(‘Country’, ‘Syrian Arab Republic’, ‘Syria’, ignore_if_exists=True) in site1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.rename_listsettings_to_usersettings in site1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v7_2.update_communications in site1.local (1bd3e0294da1 9198)
/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/contact/contact.json missing
Success
Executing frappe.patches.v8_0.deprecate_integration_broker in site1.local (1bd3e 0294da19198)
Success
Executing frappe.patches.v8_0.setup_email_inbox #2017-03-29 in site1.local (1bd3 e0294da19198)
Success
Executing frappe.patches.v8_0.newsletter_childtable_migrate in site1.local (1bd3 e0294da19198)
Success
Executing execute:frappe.db.sql(“delete from tabDesktop Icon
where module_name =‘Communication’”) in site1.local (1bd3e0294da19198)
Success
Executing execute:frappe.db.sql(“update tabDesktop Icon
set type=‘list’ where _doctype=‘Communication’”) in site1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.fix_non_english_desktop_icons # 2017-04-12 in site 1.local (1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.set_doctype_values_in_custom_role in site1.local ( 1bd3e0294da19198)
Success
Executing frappe.patches.v8_0.install_new_build_system_requirements in site1.loc al (1bd3e0294da19198)
Please update your NodeJS version
frappe@ /home/frappe/frappe-bench
├── babel-core@6.25.0
├── babel-preset-babili@0.0.12
├── babel-preset-es2015@6.24.1
├── babel-preset-es2016@6.24.1
├── babel-preset-es2017@6.24.1
├── chokidar@1.7.0
└── less@2.7.2
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/ch okidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”} )
npm WARN frappe@ No description
Success
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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, lin e 91, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, lin e 17, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 722, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 697, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/decorato rs.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 216 , in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, in mi grate
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/v8_0/set_currency_f ield_precision.py”, line 22, in execute
ss.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 23 0, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 26 3, in _save
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 77 2, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 66 6, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 88 7, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 87 0, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 66 0, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/system_setting s/system_settings.py”, line 16, in validate
minimum_password_score = cint(self.minimum_password_score) or 0
AttributeError: ‘SystemSettings’ object has no attribute 'minimum_password_score ’
“Executing frappe.patches.v8_0.install_new_build_system_requirements in site1.loc al (1bd3e0294da19198)
Please update your NodeJS version”
@dineshpanchal432
This my help: