Error while running bench migrate after restoring database successfully

I’ve restored a site from ubuntu server which having bench version 5.0.0 and frappe, erpnext version 13 to a new ubuntu server having configuration bench 5.7.5 and apps having same version as source server. database restore has completed successfully. while running bench migrate, i’m getting a validation error. frappe.exceptions.ValidationError: <div style="font-family: monospace;">Error: File to import not found or unreadable: frappe/public/scss/website.<br> on line 26 of stdin<br>>> @import "frappe/public/scss/website";<br><br> ^<br><br></div>

Migrating localhost

Updating DocTypes for frappe : [========================================] 100%
Updating DocTypes for erpnext : [========================================] 100%
Updating Dashboard for frappe
Updating Dashboard for erpnext
Updating customizations for Address
Updating customizations for Contact

Traceback (most recent call last):
File “/usr/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/utils/bench_helper.py”, line 104, in
main()
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/env/lib/python3.8/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/env/lib/python3.8/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/env/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/env/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/env/lib/python3.8/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/env/lib/python3.8/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/env/lib/python3.8/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/commands/init.py”, line 26, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/commands/site.py”, line 457, in migrate
migrate(
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/migrate.py”, line 90, in migrate
frappe.get_attr(fn)()
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/website/doctype/website_theme/website_theme.py”, line 188, in after_migrate
doc.generate_bootstrap_theme()
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/website/doctype/website_theme/website_theme.py”, line 79, in generate_bootstrap_theme
frappe.throw(’

{stderr}
’.format(stderr=stderr))
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/init.py”, line 446, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/init.py”, line 425, in msgprint
_raise_exception()
File “/mnt/workspace/workspace/tummy_and_me/erp/tummy-erp/apps/frappe/frappe/init.py”, line 379, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError:
Error: File to import not found or unreadable: frappe/public/scss/website.
on line 26 of stdin
>> @import “frappe/public/scss/website”;

^

Hi,

Try bench build and then bench update

1 Like

Tthanks for the reply. both giving same error.

What was the command(s) used to restore the database?

1 Like
bench --force --new-site localhost --source_sql /path/to/backup.sql

Try adding --with-public-files , see example here.

1 Like

this command i already executed before --with-public-files and --with-private-files but same result

what does: ls -l ~/frappe-bench/apps/frappe/frappe/public/scss/website return?

i solved the issue…thanks for helping me. i’m a newbie in frappe framework. so, i couldn’t find relations between so many things in structure of framework. when i checked asset folder in sites actually the server’s bench directory content structure and my local installation structure were different. so, i tried to match its same structure by doing different configurations. thats when i found out it was simply the version’s issue. all that time, my local installation was in development branch. when i switched to version-13. bench directory’s content structure became same. so, building the app didn’t make any issues…This community is very helpful and active.