Error migrating to v7 (line 501, in run_frappe_cmd) (SOLVED)

With the help of nabinhait in another post I solved the problem with this command:

bench --site site1.local reload-doc desk doctype desktop_icon

The other post is here: Error during update to V7 - #2 by ganas