TypeError 9595

27 views
Skip to first unread message

TEES P

unread,
Apr 13, 2021, 4:38:24 PM4/13/21
to spyder
dear friends i am facing the error below.
could you please help me how to solve it. thanks.

error

anim = FuncAnimation(fig, animate, frames=len(temperature)//skip, interval=20)

TypeError: 'module' object is not callable
temp.py

Jim Lareau

unread,
Apr 13, 2021, 5:42:09 PM4/13/21
to spyd...@googlegroups.com
It looks like you are calling the FuncAnimation module instead of FuncAnimation function within the module. 

Try importing the module like this:

import matplotlib.animation as manimation

And changing your function call like this:

anim = manimation.FuncAnimation(fig, animate, frames=len(temperature)//skip, interval=20)

Regards, 

Jim

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/26ae2086-7673-46f1-9086-b182c3fa0fe3n%40googlegroups.com.

paul kairis

unread,
Apr 14, 2021, 4:09:22 PM4/14/21
to spyd...@googlegroups.com
Reply To: TEES P

Made some changes to the code, it runs on Spyder 3.2.6


anim.py
Reply all
Reply to author
Forward
0 new messages