V12 Will Not Update

I’m having major problem in both updating to current version of 12 and trying to upgrade to v13.

However, the most immediate issue is that I continue to get errors just running bench update. I receive the error below. Can anyone please help?

Thanks in advance,

frappe@ubuntu:~/frappe-bench$ bench update
remote: Enumerating objects: 2241, done.
remote: Counting objects: 100% (1528/1528), done.
remote: Compressing objects: 100% (547/547), done.
remote: Total 1050 (delta 756), reused 791 (delta 502), pack-reused 0
Receiving objects: 100% (1050/1050), 199.42 KiB | 8.31 MiB/s, done.
Resolving deltas: 100% (756/756), completed with 135 local objects.
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript
b856fa45f…08e7d7e9f version-12 → upstream/version-12

  • [new tag] v12.22.1 → v12.22.1
  • [new tag] v12.17.0 → v12.17.0
  • [new tag] v12.18.0 → v12.18.0
  • [new tag] v12.18.1 → v12.18.1
  • [new tag] v12.19.0 → v12.19.0
  • [new tag] v12.19.1 → v12.19.1
  • [new tag] v12.19.2 → v12.19.2
  • [new tag] v12.20.0 → v12.20.0
  • [new tag] v12.21.0 → v12.21.0
  • [new tag] v12.21.1 → v12.21.1
  • [new tag] v12.22.0 → v12.22.0
    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 41, in cli
    File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 764, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 717, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 555, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/.bench/bench/commands/update.py”, line 25, in update
    update(pull=pull, patch=patch, build=build, requirements=requirements, restart_supervisor=restart_supervisor, restart_systemd=restart_systemd, backup=not no_backup, force=force, reset=reset)
    File “/home/frappe/.bench/bench/utils.py”, line 176, in update
    version_upgrade = is_version_upgrade()
    File “/home/frappe/.bench/bench/app.py”, line 286, in is_version_upgrade
    upstream_version = get_major_version(upstream_version)
    File “/home/frappe/.bench/bench/app.py”, line 430, in get_major_version
    return semantic_version.Version(version).major
    File “/usr/local/lib/python3.6/dist-packages/semantic_version/base.py”, line 105, in init
    major, minor, patch, prerelease, build = self.parse(version_string, partial)
    File “/usr/local/lib/python3.6/dist-packages/semantic_version/base.py”, line 303, in parse
    raise ValueError(‘Invalid version string: %r’ % version_string)
    ValueError: Invalid version string: ‘Release 12.22.1’



Maybe this helps.

Hello, someone help me, please. I have version 13 installed and it stopped, it gives me these logs and the Redis server immediately crashes - #2 by dj12djdjs

Unsure why you’re getting this error. Probably has to do something with the change_log folder contents.

Since you’re upgrading to v13, why don’t you run
bench switch-to-branch version-13 frappe erpnext --upgrade

Or bench update --reset
(make sure to exclude your custom apps beforehand just to be safe)

1 Like

Thanks for the reply. However, when I try to upgrade (and I’ve tried several times) all I ever get is “Server Error” web page. So I thought to try and remedy the v12 first and then re-try v13. Any suggestions on the server error on v13 completion?

Hi @GusG,

This error was a mistake in the official Frappe repository code. The __version__ variable was given invalid characters.

It appears this was fixed about 5 hours ago, however. Here’s a link to the GitHub fix:

Nothing you could have done differently. You just happened to try installation at the wrong time. :frowning:


1 Like

Does the upgrade process complete successfully? Does it show any error(s)?

I have the same error updating ver 12, and it does not seem to be fixed yet. Luckily this error is not messing up the site.



I ran a bench reset --hard in the apps/frappe folder and the update started going through okay. I think this was after a fix for this underlying issue was pushed onto the GitHub repository.

Hope this helps.



1 Like