Update to v9 options current version is erpnext 7.0.33

Hi all,
My current version is:
erpnext 7.0.33
frappe 7.0.29
There are several sites on the server.
What is the best option to update to v9?
I have tried bench update but got this track back:INFO:bench.utils:updating bench
Updating 8b40528…9c15073
error: Your local changes to the following files would be overwritten by merge:
.travis.yml
bench/cli.py
bench/commands/config.py
bench/commands/setup.py
bench/commands/utils.py
bench/config/common_site_config.py
bench/config/nginx.py
bench/config/redis.py
bench/config/site_config.py
bench/config/templates/nginx.conf
bench/patches/patches.txt
bench/patches/v4/update_node.py
bench/tests/test_setup_production.py
playbooks/develop/includes/mariadb_centos.yml
playbooks/develop/includes/mariadb_debian.yml
playbooks/develop/includes/mariadb_ubuntu.yml
playbooks/develop/includes/setup_bench.yml
playbooks/develop/includes/setup_dev_env.yml
playbooks/develop/includes/wkhtmltopdf_centos.yml
playbooks/develop/includes/wkhtmltopdf_ubuntu_debian.yml
playbooks/develop/install.yml
playbooks/develop/macosx.yml
playbooks/develop/templates/simple_mariadb_config.cnf
playbooks/develop/ubuntu.yml
playbooks/production/includes/setup_bench_production.yml
playbooks/production/install.yml
playbooks/production/templates/default_nginx.j2
playbooks/production/templates/frappe_selinux.te
vm/ansible/roles/wkhtmltopdf/defaults/main.yml
vm/ansible/roles/wkhtmltopdf/tasks/main.yml
vm/ansible/templates/mariadb_config.cnf
vm/ansible/vm.yml
Please, commit your changes or stash them before you can merge.
Aborting
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 34, in update
update_bench()
File “/home/frappe/.bench/bench/utils.py”, line 227, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/.bench/bench/utils.py”, line 127, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

Thanks

If you don’t have any custom changes to your files, you can try, bench update --reset

Hi @Pawan, thanks for the response.
I followed this to resolve the “commit your changes or stash them before you can merge error”:

However It gave another error:

root@localhost:/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/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
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    /home/frappe/frappe-bench/env/local/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 Advanced Usage - urllib3 2.2.0 documentation.
    SNIMissingWarning
    /home/frappe/frappe-bench/env/local/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.2.0 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/erpnext/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/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…
    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 289, in backup
    odb = scheduled_backup(ignore_files=not with_files, backup_path_db=backup_path_db, backup_path_files=backup_path_files, backup_path_private_files=backup_path_private_files, force=True)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 166, in scheduled_backup
    odb = new_backup(older_than, ignore_files, backup_path_db=backup_path_db, backup_path_files=backup_path_files, force=force)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 176, in new_backup
    odb.get_backup(older_than, ignore_files, force=force)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 48, in get_backup
    self.set_backup_file_name()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 63, in set_backup_file_name
    todays_date = now_datetime().strftime('%Y%m%d
    %H%M%S’)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 121, in now_datetime
    dt = convert_utc_to_user_timezone(datetime.datetime.utcnow())
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 144, in convert_utc_to_user_timezone
    return utcnow.astimezone(timezone(get_time_zone()))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 138, in get_time_zone
    return frappe.cache().get_value(“time_zone”, _get_time_zone)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 72, in get_value
    val = generator()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 132, in _get_time_zone
    return frappe.db.get_system_setting(‘time_zone’) or ‘Asia/Kolkata’
    File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 872, in get_system_setting
    return frappe.cache().get_value(“system_settings”, _load_system_settings).get(key)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 72, in get_value
    val = generator()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 871, in _load_system_settings
    return self.get_singles_dict(“System Settings”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 545, in get_singles_dict
    tabSingles where doctype=%s"“”, doctype))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 123, in sql
    self.connect()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 69, in connect
    use_unicode=True, charset=‘utf8mb4’)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect
    return Connection(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 193, in init
    super(Connection, self).init(*args, **kwargs2)
    _mysql_exceptions.OperationalError: (1045, “Access denied for user ‘1b33bd13dcaa3c4a’@‘localhost’ (using password: YES)”)

Now when I check the version it gives version 9.x, but I can’t access the erpnext properly. It gives the Uncaught Server Exception like these:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 32, in render
if can_cache() and frappe.cache().hget(‘website_404’, frappe.request.url):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 101, in render_page_by_language
response.mimetype = mimetypes.guess_type(frappe.flags.file_path)[0] or b’application/octet-stream’
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 117, in render_page
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 124, in build
lang_path = ‘{0}/{1}’.format(user_lang, path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 137, in build_page
out = None
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 15, in get_context
context = get_page_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 18, in get_page_context
context = get_page_info_from_template(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 27, in make_page_context
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 49, in resolve_route
if context.page_title:
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 72, in get_page_context_from_doctype
return None
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 94, in get_page_info_from_doctypes
for doctype in get_doctypes_with_web_view():
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 32, in get_controller
if custom:
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/init.py”, line 64, in load_doctype_module
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 643, in get_module
return frappe.modules.load_doctype_module(doctype)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/doctype/web_form/web_form.py”, line 11, in
from frappe.custom.doctype.customize_form.customize_form import docfield_properties
File “/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/customize_form/customize_form.py”, line 15, in
from frappe.core.doctype.doctype.doctype import validate_fields_for_doctype
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 17, in
from frappe.model.db_schema import validate_column_name, validate_column_length
ImportError: cannot import name validate_column_length

Any idea how to reslove it?

Thanks