August 17th, 2013, 02:57 PM
TypeError: 'dict' object is not callable
I tried to run a program (moving a circle by arrow keys) on codescupltor but I get this error TypeError: 'dict' object is not callable.
What's wrong in it? I am a beginner so please help me to understand clearly. Thank you.
I get error second line of below code.
if key == simplegui.KEY_MAP('left'):
elif key == simplegui.KEY_MAP("right"):
elif key == simplegui.KEY_MAP("up"):
elif key == simplegui.KEY_MAP("down"):
August 17th, 2013, 03:30 PM
You need to use brackets instead of parentheses: () is calling,  is indexing.
Originally Posted by alapatik
My armada: openSUSE 13.1 (home desktop, home laptop), Crunchbang Linux 11 (work laptop), Trisquel GNU/Linux 6.0.1 (mini laptop), Ubuntu 14.04 LTS (server), Android 4.2.1 (tablet), Windows 7 Ultimate (testbed)
August 17th, 2013, 08:00 PM
Thank you. Solved.
Originally Posted by SuperOscar