Database or site_config.json may be corrupted

@bahaou if i dont want these changes to commit? i dont want to push custom app to git. Then what should i do?

@Aditya_Vig , uninstall it if you don’t need it.

@bahaou these all problems started when i added erpnext and version 13. Before that i was to do update and everything. But now i am also not able to bench start. I am not able to open my site also.

@Aditya_Vig why you can’t use bench start ?

@bahaou when i do it, it is not running.

@Aditya_Vig omg. nothing is right . are you willing to install a brand new app ?

Hi @Aditya_Vig

The first thing you need to do is

Go to the apps folder and then kyc_customization folder

Once there type – git status

It will tell you the files that need to commit or discard.

try:
bench setup requirements

2 Likes

this is helping me

In frappe-bench/apps/frappe/frappe/utils/backups.py, I changed the delete_temp_backups() function as the following and it had solved my issue.

def delete_temp_backups(older_than=24):
    """
    Cleans up the backup_link_path directory by deleting older files and directories.
    """
    older_than = cint(frappe.conf.get('keep_backups_for_hours', older_than))
    backup_path = get_backup_path()

    if os.path.exists(backup_path):
        file_list = os.listdir(backup_path)

        for this_file in file_list:
            this_file_path = os.path.join(backup_path, this_file)

            try:
                # Check if the path is a file or directory and handle accordingly
                if os.path.isfile(this_file_path) and is_file_old(this_file_path, older_than):
                    os.remove(this_file_path)
                elif os.path.isdir(this_file_path):
                    # Use shutil.rmtree to remove directories
                    shutil.rmtree(this_file_path)
                    print(f"Removed directory: {this_file_path}")
            except Exception as e:
                print(f"Error removing {this_file_path}: {str(e)}")
2 Likes

Thank you, that worked for me also.

worked well for me, so you can rely on it with confidence.