ERPNext Version 9 will be released on 26th September 2017

can you explain why you suggest to say.‘no’?

Only that when I accepted yes for this option and nginx.conf ERPNext became unavailable via https. Not sure why.

Firs of all thank you all efforts for the team!

Please advise:

bench update —upgrade
Not working in VM instance
Error: no such option —upgrade

The
bench upgrade
upgrade the system to v9 anyway.

Is this normal bahaviour?

Should be --upgrade as the switch is two dashes

Julian

@Julian_Robbins

Yes I mean
two dashes
– upgrade ( I can’t type it correctly, sometime)

bench update
Updated the full system to v9 anyhow.

After updated to v9.

The
bench update --upgrade

Error: no such option —upgrade

Any help please.

One more thought:

There is no options like
–upgrade
for bench in bench manager.
Only --version + --help existing.

ERPNEXT UPGRADE – 2017-09-27 13-43-04

Is this normal behaviour?

We have removed --upgrade options from bench update command. Instead now, it will take your input (Y/N) before upgrading to a major version.

3 Likes

We have pushed a new branch v8.x.x which will maintain the latest code of version 8.

So, if you don’t want to update to version 9 but want latest code of version 8, you can switch to v8.x.x branch manually for both frappe and erpnext repository. After switching to that branch you can run bench --site <your-site-name> migrate from frappe-bench.

2 Likes

@nabinhait

Appreciate your words
explain everything clearly.

Have a wonderfull day!

2 Likes

Hi, Is v8.x.x still available? This is what I get when i try to do bench switch-to-branch v8.x.x

[Chudes-MacBook-Pro:frappe-master chudeosiegbu$ bench switch-to-branch v8.x.x
Branch v8.x.x does not exist in Upstream for erpnext
Branch v8.x.x does not exist in Upstream for frappe
Switched to v8.x.x
Please run `bench update --patch` to be safe from any differences in database schema

I seem to have been able to run the same thing successfully yesterday.

Hi! Upon running the update, the migration seems to get stuck specifically when installing the Shopify patch. It seems to refer to a custom field I created called tax_id. I am not using Shopify, so perhaps skipping it during migration would help. Deleting the field is not an option, for it stores the all-important, and necessary tax_id. unless it is a non related doctype which needs to have only single field. Any ideas ?

Executing erpnext_shopify.patches.V1_0.set_variant_id #2015-12-01 in site1.local (1bd3e0294d)
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 <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/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_funcreturn 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/erpnext_shopify/erpnext_shopify/patches/V1_0/set_variant_id.py", 
line 14, in execute
sync_fixtures("erpnext_shopify")
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/fixtures.py", line 24, in sync_fixtures
ignore_links=True, overwrite=True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/page/data_import_tool/data_import_tool.py", 
line 95, in import_doc
frappe.modules.import_file.import_file_by_path(f, data_import=True, force=True, 
pre_process=pre_process, reset_permissions=True)
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 220, in insert
self.run_post_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 796, in run_post_save_methods
self.run_method("on_update")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 672, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 893, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 876, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 666, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 51, in on_update
validate_fields_for_doctype(self.dt)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 384, in validate_fields_for_doctype
validate_fields(frappe.get_meta(doctype, cached=False))
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 613, in validate_fields
check_unique_fieldname(d.fieldname)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 412, in check_unique_fieldname
frappe.throw(_("Fieldname {0} appears multiple times in rows {1}").format(fieldname, ", ".join(duplicates)))
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 319, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red')
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 309, in msgprint
_raise_exception()
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 282, in _raise_exception
raise raise_exception(encode(msg))
frappe.exceptions.ValidationError: Fieldname tax_id appears multiple times in rows 9, 19`

TEMPORARY SOLUTION FOUND

I attempted to remove the Shopify connector, and was able to update with only one minor error regarding the currency precision patch.
First i Uninstalled the Shopify app.

bench uninstall-app erpnext_shopify

Then I updated using:

bench update --reset

It executed the update, this time it gives me another error, but when I run it again, it finishes adequately without any further errors and works seemingly without errors on my production server.

However, the Shopify issue with this custom field seems to be a bug that needs to be considered for future updates.
Also this error:

Executing frappe.patches.v8_0.set_currency_field_precision	# 2017-05-09 in site1.local (1bd3e0294d)
Traceback (most recent call last):
..... ((((((for full dump, send me a message!!!))))))
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/system_settings/system_settings.py", line 17, in validate
minimum_password_score = cint(self.minimum_password_score) or 0
AttributeError: 'SystemSettings' object has no attribute 'minimum_password_score'

If anyone else is facing the similar issue where you have a custom field with the same name as newly introduced standard field, you can delete your custom field. Deleting a custom field does not delete the related column from the database table. And after syncing the standard field, the existing data will be automatically mapped into the new field.

3 Likes

In general, its a good idea to add some sort of prefix to custom fields to prevent collisions. We usually add some sort of installation-specific prefix to our custom fields so collisions are much less likely. We had to learn this lesson the hard way.

3 Likes

We have deprecated bench switch-to-branch v8.x.x command, that’s why you are getting this error. Now, while doing bench update to a major version, system give you the option to remain on the latest release of existing version.

Otherwise, you can also switch to v8.x.x branch manually and run bench migrate thereafter.

That’s also a very good idea to create your custom field.

Thanks, by manually you mean git pull upstream v8.x.x ?

git fetch upstream
git checkout v8.x.x

Hi @nabinhait,

Out of curiosity, how do you manage such collisions on ERPNext cloud ?
Is there a way to automatically to delete the custom field through bench ?

Thanks :smiley:

Is the schedule installment for invoice payment will add to this version