Error while update v7.1 to v9

Anyone resolve this error.

/home/frappe/frappe-bench# 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/local/lib/python2.7/site-packages
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

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling fleet_management
    INFO:bench.utils:git pull upstream master
    From GitHub - dalwadani/fleet_management: Frappe app for managing the organization fleet.
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    /home/frappe/frappe-bench/env/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
    SNIMissingWarning
    /home/frappe/frappe-bench/env/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see Advanced Usage - urllib3 2.0.0a2 documentation.
    InsecurePlatformWarning
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/fleet_management/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext_shopify/requirements.txt
    /home/frappe/frappe-bench/env/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
    SNIMissingWarning
    /home/frappe/frappe-bench/env/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see Advanced Usage - urllib3 2.0.0a2 documentation.
    InsecurePlatformWarning
    Could not find a version that satisfies the requirement erpnext (from -r ./apps/erpnext_shopify/requirements.txt (line 2)) (from versions: )
    No matching distribution found for erpnext (from -r ./apps/erpnext_shopify/requirements.txt (line 2))
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 11, in
    load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
    File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
    bench_command()
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/.bench/bench/commands/update.py”, line 58, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
    File “/home/frappe/.bench/bench/commands/update.py”, line 74, in _update
    update_requirements(bench_path=bench_path)
    File “/home/frappe/.bench/bench/utils.py”, line 410, in update_requirements
    install_requirements(pip, req_file)
    File “/home/frappe/.bench/bench/utils.py”, line 446, in install_requirements
    exec_cmd(“{pip} install -q -r {req_file}”.format(pip=pip, req_file=req_file))
    File “/home/frappe/.bench/bench/utils.py”, line 140, in exec_cmd
    raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/erpnext_shopify/requirements.txt

Here’s advice to try for what seems to be the same error

Upgrade fails when updating ERPNext v8.0.65 to v9.1.5 - #4 by clarkej

Thanks for your reply.
but this link is not help to me. so i uninstall and removed this app erpnext_shopify, and then run bench update now i got this error…
/home/frappe/frappe-bench# sudo 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/local/lib/python2.7/site-packages
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

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling fleet_management
    INFO:bench.utils:git pull upstream master
    From GitHub - dalwadani/fleet_management: Frappe app for managing the organization fleet.
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    /home/frappe/frappe-bench/env/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
    SNIMissingWarning
    /home/frappe/frappe-bench/env/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see Advanced Usage - urllib3 2.0.0a2 documentation.
    InsecurePlatformWarning
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/fleet_management/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2
    npm WARN frappe@ No description
    Backing up sites…
    Patching sites…
    Migrating site1.local
    Executing frappe.patches.v9_1.add_sms_sender_name_as_parameters in site1.local (1bd3e0294da19198)
    /home/frappe/frappe-bench/apps/erpnext/erpnext/setup/doctype/sms_settings/sms_settings.json missing
    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/v9_1/add_sms_sender_name_as_parameters.py”, line 11, in execute
    sms_settings = frappe.get_doc(“SMS Settings”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 622, in get_doc
    return frappe.model.document.get_doc(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 66, in get_doc
    controller = get_controller(doctype)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 35, in get_controller
    module = load_doctype_module(doctype, module_name)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 185, in load_doctype_module
    raise ImportError(‘Module import failed for {0} ({1})’.format(doctype, module_name + ’ Error: ’ + str(e)))
    ImportError: Module import failed for SMS Settings (erpnext.setup.doctype.sms_settings.sms_settings Error: No module named sms_settings.sms_settings)

Please assist me to resolve this error

@nabinhait added that patch 2 days ago. Please can you advise Nabin?

The patch already reloads SMS Settings - that is the only general ‘fix’ I know to try that may resolve this general failed migration problem.

so now what i have to do ?
please help to solve this issue

Hi,
I have not done this before, but I guess you should be able to upgrade step by step.
In a local instance create a site, restore with you production db and try upgrading to 8.0 by checking out

git checkout -b temp v8.0.0

in both frappe and erpnext folder, then run bench migrate, if it goes fine, increment to next version and migrate.
This is not straight forward, but worth a try if you are stuck.
Thanks

Things to try eitadmin - your log reports this file missing

Migrating site1.local
Executing frappe.patches.v9_1.add_sms_sender_name_as_parameters in site1.local (1bd3e0294da19198)
/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/doctype/sms_settings/sms_settings.json missing

So copy this file to restore to your local -

Then rerun ‘bench migrate’

Another option is to comment out the ‘problem’ patch add_sms_sender_name_as_parameters.py, then rerun the migrate.

Here is the original problem report Removed SMS sender field from SMS Settings by nabinhait · Pull Request #4334 · frappe/frappe · GitHub

A third option is to switch from master to develop branch, see if that migrate is successful, then switch back to master.

now i reset my all changes.

now i got this error, how to solve this

/home/frappe/frappe-bench# 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/local/lib/python2.7/site-packages
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

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling fleet_management
    INFO:bench.utils:git pull upstream master
    From GitHub - dalwadani/fleet_management: Frappe app for managing the organization fleet.
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/fleet_management/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2
    npm WARN frappe@ No description
    Backing up sites…
    Patching sites…
    Migrating site1.local
    Executing erpnext.patches.v8_0.disable_instructor_role in site1.local (1bd3e0294da19198)
    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/erpnext/erpnext/patches/v8_0/disable_instructor_role.py”, line 15, in execute
    role = frappe.get_doc(“Role”, “Instructor”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 622, in get_doc
    return frappe.model.document.get_doc(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 68, in get_doc
    return controller(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 103, in init
    self.load_from_db()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 140, in load_from_db
    frappe.throw(
    (“{0} {1} not found”).format(
    (self.doctype), self.name), frappe.DoesNotExistError)
    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.DoesNotExistError: Role Instructor not found

What do you mean by this, commands did you use?

No. i am not use any command.
This is my duplicate server so i terminate this testing server and again i was taken new duplicate server from my live server before creating duplicate server i’ve done to clear my sms setting from erpnext live instance.

Fixed both sms_settings and instructor patch error. Please update again.

2 Likes

Thanks for your support.
But now i got this error after bench update

File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
frappe.exceptions.ValidationError: End date must be greater than start date

what do i do ?

You will need to identify the code causing this
frappe.exceptions.ValidationError: End date must be greater than start date

Search the forum to learn more otherwise you may want to engage qualified support eitadmin

please to resolve this error, Is there any way to go update?

/home/frappe/frappe-bench# sudo 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/local/lib/python2.7/site-packages
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

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling fleet_management
    INFO:bench.utils:git pull upstream master
    From GitHub - dalwadani/fleet_management: Frappe app for managing the organization fleet.
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    /home/frappe/frappe-bench/env/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
    SNIMissingWarning
    /home/frappe/frappe-bench/env/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see Advanced Usage - urllib3 2.0.0a2 documentation.
    InsecurePlatformWarning
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/fleet_management/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2
    npm WARN frappe@ No description
    Backing up sites…
    Patching sites…
    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 frappe.patches.v8_0.update_gender_and_salutation in site1.local (1bd3e0294da19198)
    Success
    Executing execute:frappe.db.sql(‘update tabReport set module=“Desk” where name=“ToDo”’) in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_1.enable_allow_error_traceback_in_system_settings in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_1.update_format_options_in_auto_email_report in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_1.delete_custom_docperm_if_doctype_not_exists in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_5.delete_email_group_member_with_invalid_emails in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_x.update_user_permission in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_5.patch_event_colors in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_10.delete_static_web_page_from_global_search in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_x.add_bgn_xaf_xof_currencies in site1.local (1bd3e0294da19198)
    Updating country info : [========================================]
    Success
    Executing frappe.patches.v9_1.add_sms_sender_name_as_parameters in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.move_perpetual_inventory_setting in site1.local (1bd3e0294da19198)
    Success
    Executing execute:frappe.reload_doc(‘stock’, ‘doctype’, ‘warehouse’) # 2017-04-24 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.stock_uom_in_selling in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.create_domain_docs #16-05-2017 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_1.save_stock_settings in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_1.rename_quality_inspection_field in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_1.update_bom_base_currency in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_1.set_budget_against_as_cost_center in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_1.set_currency_exchange_date in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_1.set_sales_person_status in site1.local (1bd3e0294da19198)
    Success
    Executing execute:frappe.delete_doc(‘Desktop Icon’, {‘module_name’: ‘Profit and Loss Statment’}) in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_website_for_variant in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_assessment_modules in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_doctype_status in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_salary_slips in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.delete_fleet_management_module_def in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.contact_address_links in site1.local (1bd3e0294da19198)
    Updating Contact : [========================================]
    Updating Address : [========================================]
    Success
    Executing erpnext.patches.v7_2.mark_students_active in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.set_null_value_to_fields in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_guardian_name_in_student_master in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_abbr_in_salary_slips in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.rename_evaluation_criteria in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_party_type in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.setup_auto_close_settings in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.rename_att_date_attendance in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_attendance_docstatus in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.move_dates_from_salary_structure_to_employee in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.make_all_assessment_group in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.repost_reserved_qty_for_multiple_sales_uom in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.addresses_linked_to_lead in site1.local (1bd3e0294da19198)
    Success
    Executing execute:frappe.delete_doc(‘DocType’, ‘Purchase Common’) in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_stock_qty_value_in_purchase_invoice in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_supplier_address_in_stock_entry in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.rename_is_sample_item_to_allow_zero_valuation_rate in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.set_null_to_serial_nos_for_disabled_sales_invoices in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.enable_booking_asset_depreciation_automatically in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.set_project_copied_from in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_status_as_paid_for_completed_expense_claim in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.revert_manufacturers_table_from_item in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.disable_instructor_role in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.merge_student_batch_and_student_group in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.rename_total_margin_to_rate_with_margin # 11-05-2017 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.fix_status_for_invoices_with_negative_outstanding in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.make_payments_table_blank_for_non_pos_invoice in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.set_sales_invoice_serial_number_from_delivery_note in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.delete_schools_depricated_doctypes in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_customer_pos_id in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.rename_items_in_status_field_of_material_request in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.delete_bin_indexes in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.move_account_head_from_account_to_warehouse_for_inventory in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.change_in_words_varchar_length in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_stock_qty_value_in_bom_item in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_sales_cost_in_project in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.save_system_settings in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.delete_deprecated_reports in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v9_0.remove_subscription_module in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_7.make_subscription_from_recurring_data in site1.local (1bd3e0294da19198)
    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/erpnext/erpnext/patches/v8_7/make_subscription_from_recurring_data.py”, line 24, in execute
    make_subscription(doctype, data)
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v8_7/make_subscription_from_recurring_data.py”, line 46, in make_subscription
    }).insert(ignore_permissions=True)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 218, in insert
    self.run_before_save_methods()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 809, in run_before_save_methods
    self.run_method(“validate”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 702, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 924, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 907, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 696, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py”, line 20, in validate
    self.validate_dates()
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py”, line 50, in validate_dates
    frappe.throw(
    (“End date must be greater than start date”))
    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: End date must be greater than start date

I have sent a pull request, it should fix the issue. The PR will be merged tomorrow.

https://github.com/frappe/erpnext/pull/11292

Till i got the same error…

File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
frappe.exceptions.ValidationError: End date must be greater than start date

please do the needful

Does the PR updated ?

Till same error not fixed, what should i have to do ?

We have merged the PR today and it is part of the latest release.

Thanks for your support. But am sorry sir,
Till getting the same error…

/home/frappe/frappe-bench# 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/local/lib/python2.7/site-packages
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

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling fleet_management
    INFO:bench.utils:git pull upstream master
    From GitHub - dalwadani/fleet_management: Frappe app for managing the organization fleet.
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/fleet_management/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2
    npm WARN frappe@ No description
    Backing up sites…
    Patching sites…
    Migrating site1.local
    Executing erpnext.patches.v8_7.make_subscription_from_recurring_data in site1.local (1bd3e0294da19198)
    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/erpnext/erpnext/patches/v8_7/make_subscription_from_recurring_data.py”, line 27, in execute
    make_subscription(doctype, data, date_field)
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v8_7/make_subscription_from_recurring_data.py”, line 55, in make_subscription
    }).insert(ignore_permissions=True)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 218, in insert
    self.run_before_save_methods()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 809, in run_before_save_methods
    self.run_method(“validate”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 702, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 964, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 947, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 696, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py”, line 21, in validate
    self.validate_dates()
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py”, line 54, in validate_dates
    frappe.throw(
    (“End date must be greater than start date”))
    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: End date must be greater than start date

By definition a ValidationError flags a data problem, correct?

So the patch and code are problem free, it’s the user data has the problem here!

So identify the problem doctype and fix that eitadmin?

1 Like