For creating my game im importing my image assets and sounds using a dictionary. It seams to work fine with my image files but when I import my sound files the exact same way, it gives me the following runtime error message:
RuntimeError: dictionary changed size during iteration
def import_assets(self):
character_path = 'assets/'
for animation in player_anim.keys():
full_path = character_path + animation
player_anim[animation] = import_folder(full_path)
for sound in list(Sound):
full_path = character_path + sound
Sound[animation] = import_sounds(full_path)