Hello Frappe community!
I’m encountering an issue when trying to restore a backup using the bench restore
command. Here’s the traceback for the error I’m receiving:
(env) frappe@ff2087e43cb5:/workspace/development/frappe-bench$ bench restore /workspace/development/frappe-bench/sites/development.localhost/private/backups/20230915_010323-development_localhost-database.sql.gz
Traceback (most recent call last):
File "/home/frappe/.pyenv/versions/3.10.12/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/frappe/.pyenv/versions/3.10.12/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 109, in <module>
main()
File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name="bench")
File "/workspace/development/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/workspace/development/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/workspace/development/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/workspace/development/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/workspace/development/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/workspace/development/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/workspace/development/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/workspace/development/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/workspace/development/frappe-bench/apps/frappe/frappe/commands/site.py", line 202, in restore
if not force and is_downgrade(decompressed_file_name, verbose=True):
File "/workspace/development/frappe-bench/apps/frappe/frappe/installer.py", line 789, in is_downgrade
app_rows = frappe.safe_eval(line)
File "/workspace/development/frappe-bench/apps/frappe/frappe/__init__.py", line 2279, in safe_eval
return safe_eval(code, eval_globals, eval_locals)
File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/safe_exec.py", line 99, in safe_eval
_validate_safe_eval_syntax(code)
File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/safe_exec.py", line 117, in _validate_safe_eval_syntax
tree = ast.parse(code, mode="eval")
File "/home/frappe/.pyenv/versions/3.10.12/lib/python3.10/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "<unknown>", line 0
SyntaxError: invalid syntax
Additional details:
- Frappe Framework Versions Tested: v14.43.0 (version-14) and v14.49.0
- Python Version: 3.10.12 (as seen from the traceback)
- The issue arises after performing a
bench migrate
. - I’ve tried a fresh installation with only the Frappe framework, and the issue persists.
Any insights or guidance on what might be causing this and how to resolve it would be greatly appreciated.
Thank you in advance for your support!