Bench Init error - bench 5.28

Trying to initialize a bench on a GCP VM.

OS - ubuntu 22.04LTS.
Bench version 5.28
Python 3.10 (though i have tried 3.14, and a few other configurations)

everything goes fine until the bench init. Throws the following error at the installing frappe stage:

× Failed to build frappe @ file:///home/sandratoolan001/frappe-bench/apps/frappe
├─▶ The build backend returned an error
╰─▶ Call to flit_core.buildapi.build_editable failed (exit status: 1)

  [stderr]
  Traceback (most recent call last):
    File "<string>", line 14, in <module>
    File
  "/home/sandratoolan001/.cache/uv/builds-v0/.tmpcVQCYA/lib/python3.10/site-packages/flit_core/buildapi.py",
  line 32, in get_requires_for_build_wheel
      docstring, version = get_docstring_and_version_via_ast(module)
    File
  "/home/sandratoolan001/.cache/uv/builds-v0/.tmpcVQCYA/lib/python3.10/site-packages/flit_core/common.py",
  line 149, in get_docstring_and_version_via_ast
      node = ast.parse(f.read())
    File "/usr/lib/python3.10/ast.py", line 50, in parse
      return compile(source, filename, mode, flags,
    File "<unknown>", line 91
      type ConfType = _dict[str, Any]  # type: ignore[no-any-explicit]
           ^^^^^^^^
  SyntaxError: invalid syntax

  hint: This usually indicates a problem with the package or the build environment.

Tried some obvious stuff.
bench setup requirements - throws whole bunch of uv errors, that i’d prefer to not chase as i’m on fourth vm diag attempt.s
This config is solid generally - i’m thinking its frappe not me :wink: anybody else having the problem.
anybody got any ideas please?

Use this command for bench init:

bench init --python python3.14 develop

and in apps’s choose virtual env with 3.14

1 Like

Also, update node to 24

Try this script if and let us know if you face the same problem

Please share what error you’re facing with python 3.14 - this won’t be the error. 3.14 is required for develop branch / version 16.

Sorry i did resolve manage to resolve it, but message was in moderation so i couldn’t update here.

what solved my immediate problem was running a bench init with a version specified:

bench init –frappe-branch version-15 frappe-bench

that stopped the init breaking. Obviously v16 has new dependencies which i’m still getting bitten by as i did a bunch of work locally and when i wanted to restore cloud side, i discovered the backups were v16 whereas the config i’m running in GCP is 15.93, i think. Locally i had run a few bench updates when it reminded me, but nothing special that i can remember - but i can be wrong on this, may have been warning somewhere i ignored as i was playing in my local devtest.
So the work involved some app build and i brought in a bunch of data, all local and now i’m working my through the forced restore cloud side as its swearing at me. I’m new to the space - we bump our heads, we learn :wink:

2 Likes