Can't animate AnimationSprite2D

Godot Version

4

Question

Hi guys i’m a new dev and i’m still new to godot so if my coding is kinda bad that’s the reason. Anyways in this function for some reason the sprite animation doesn’t play even if the path is correct

func partyN_animate(n,name):
	var path="/root/BattleScene/PlayerGroup/"+get_partyN_id(n)+"/AnimatedSprite2D"
	print_debug(path)
	party[n].Sprite = get_node(path)
	print_debug(party[n].Sprite)
	party[n].Sprite.play(name)

I call this function when the scene player_group is loaded here

# player_group scene

func _ready():	
	Gv.partyN_draw(0)
	Gv.partyN_animate(0,"idle")

I tried debugging multiple times in the func partyN_animate and every time i got this output that to me seems correct

OUTPUT 

#FIRST DEBUG PRINT
/root/BattleScene/PlayerGroup/darkwitch/AnimatedSprite2D
   At: res://Assets/Scripts/GV.gd:66:partyN_animate()
#SECOND DEBUG PRINT
AnimatedSprite2D:<AnimatedSprite2D#45164267213>
   At: res://Assets/Scripts/GV.gd:68:partyN_animate()

I share with you my project remote tree while debugging and other part of main script for more clarity

NOTE: idk if this is important but the script underneath and the partyN_animate func is in a singleton autoload (script Gv in the remote tree)

class PartyMember :
	var Party_Id = ""
	var Party_Health = 0
	var Party_Atk = 0
	var Party_Def = 0
	var Party_exp = 0
	var instance 
	var Sprite 
	
func init(party_id,party_health,party_atk,party_def,party_exp):
	var p=PartyMember.new()
	p.Party_Id=party_id
	p.Party_Health = party_health
	p.Party_Atk = party_atk
	p.Party_Def = party_def
	p.Party_exp = party_exp
	return p

func _ready():
	var p=init("darkwitch",100,25,10,0)
	party.append(p)	
func get_partyN_id(n):
	return party[n].Party_Id

problemGodot

I appreciate all the help or even suggestions if you feel like sharing with me