Bench migrate error while migrate the bench

Migrating site1.local
Traceback (most recent call last):
File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, 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/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.6/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 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 230, in migrate
frappe.init(site=site)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 174, in init
setup_module_map()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 980, in setup_module_map
for module in get_module_list(app):
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 850, in get_module_list
return get_file_items(os.path.join(os.path.dirname(get_module(app_name).file), “modules.txt”))
AttributeError: module ‘strawberi’ has no attribute ‘file

The ‘strawberi’ app you defined is not found as expected on your file system, so check for modules missing in app/strawberi/strawberi?

The convention is each app has a modules.txt that lists the modules that implement the associated app.

For example in this case:

frappe@ubuntu:~/frappe-bench$ find . -name ‘modules.txt’
./apps/erpnext/erpnext/modules.txt
./apps/frappe/frappe/modules.txt

Here are the erpnext app modules:

frappe@ubuntu:~/frappe-bench$ ls -al apps/erpnext/erpnext
total 256
drwxr-xr-x 44 frappe frappe 4096 Feb 12 07:21 .
drwxr-xr-x 10 frappe frappe 4096 Feb 12 07:21 …
drwxr-xr-x 11 frappe frappe 4096 Feb 12 07:21 accounts
drwxr-xr-x 4 frappe frappe 4096 Feb 12 07:21 agriculture
drwxr-xr-x 5 frappe frappe 4096 Feb 12 07:21 assets
drwxr-xr-x 7 frappe frappe 4096 Feb 12 07:21 buying
drwxr-xr-x 11 frappe frappe 4096 Feb 12 00:50 change_log
drwxr-xr-x 3 frappe frappe 4096 Feb 12 07:21 commands
drwxrwxr-x 4 frappe frappe 4096 Feb 12 08:03 communication
drwxr-xr-x 3 frappe frappe 4096 Feb 12 07:21 config
drwxr-xr-x 4 frappe frappe 4096 Feb 12 07:21 controllers
drwxr-xr-x 5 frappe frappe 4096 Feb 12 07:21 crm
drwxr-xr-x 6 frappe frappe 4096 Feb 12 07:21 demo
drwxr-xr-x 5 frappe frappe 4096 Jun 26 2019 docs
drwxr-xr-x 3 frappe frappe 4096 Feb 12 07:21 domains
drwxr-xr-x 6 frappe frappe 4096 Feb 12 07:21 education
drwxr-xr-x 7 frappe frappe 4096 Feb 12 07:21 erpnext_integrations

It looks like you tried to add a custom application, but it was removed … and now the module is still in the site … you may want to look at your custom app and make sure you’re not defining any modules … code would be nice … I’ve ran across this issue a few times