Thank you, guys, just by adding 'iob:' makes it working.
Now I get another problem, I have a button action link to this function, and every time I press this button, the whole Pythonista will stuck.
state = False
def start(sender):
def ani_pause():
sender.image = ui.Image('iob:pause_32')
def ani_play():
sender.image = ui.Image('iob:play_32')
global state
if state is False:
ui.animate(ani_pause)
state = True
start_time = round(time.time())
label = sender.superview['label1']
label2 = sender.superview['label2']
while int(label.text) != '131':
time_now = round(time.time())
duration = time_now - start_time
time_left = divmod(duration, 360)[1]
label2.text = str(time_left)
if time_left == 0:
label.text = str(int(label.text) + 1)
else:
continue
ui.animate(ani_play)
state = False
else:
state = False
ui.animate(ani_play)