How can I export asset file to BMP by the python script

here is my script

export_path = r"/Game/test"
root_package_path = "/Game/test"
asset_data_array = unreal.AssetRegistryHelpers.get_asset_registry().get_assets_by_path(root_package_path)
unreal.log(len(asset_data_array))


for asset_data in asset_data_array:
    asset_name = asset_data.get_editor_property('asset_name')
    path = os.path.join(export_path, "%s.bmp" % asset_name)
    exporter = unreal.TextureExporterBMP()
    task = unreal.AssetExportTask()
    task.set_editor_property("object", asset_data.get_asset())
    task.set_editor_property("filename", path)
    task.set_editor_property("exporter", exporter)
    task.set_editor_property("automated", True)
    task.set_editor_property("prompt", False)
    task.set_editor_property("replace_identical", True)
    task.set_editor_property("write_empty_files", True)
    # task.set_editor_property("errors", errors)


    ret = unreal.Exporter.run_asset_export_task(task)
    unreal.log(ret)
    errors = task.get_editor_property("errors")
    unreal.log(errors)

I got the errors:
couldn’t open file

here is mistake
ret = unreal.Exporter.run_asset_export_task(task)

you should use your created exporter
exporter.run_asset_export_task(task)

            tga_exporter = unreal.TextureExporterTGA()
            
            export_task = unreal.AssetExportTask()
            export_task.exporter = tga_exporter
            export_task.automated = True
            export_task.filename= r"D:\folder\texture.tga"
            export_task.object = texture_like_object
            export_task.prompt = False
            
            tga_exporter.run_asset_export_task(export_task)