Questions tagged [callable]

A task that returns a result and may throw an exception.

The Callable interface is similar to Runnable, in that both are designed for classes whose instances are potentially executed by another thread. A Runnable, however, does not return a result and cannot throw a checked exception.

655 questions
-2
votes
2 answers

TypeError: 'str' object is not callable on line 200 in main.py

I have no idea what string it's talking about so I am kind of stuck. Also have no clue how a string can't be callable, did they mean variable or something? from time import * sleep(1) axecount = 0 #intro def fail(): global rcommand rcommand =…
-2
votes
2 answers

Runnable does not run inside Callable

In the following code I create a callable which creates a Runnable inside the call()-method. My problem is that run()-method is never reached (code does not get executed). Do you know why and how to fix that? public static void main(String[]…
Philip94
  • 17
  • 5
-2
votes
2 answers

Are Python "function objects" functions?

We all know that functions are objects as well. But how do function objects compare with functions? What are the differences between function objects and functions? By function object I mean g so defined: class G(object): def __call__(self,…
jimifiki
  • 4,779
  • 1
  • 28
  • 53
-2
votes
2 answers

Python TypeError: 'list' object is not callable with a dict dictionary, if boolean

I have a dictionary that converts an index number to a node name. I am trying to check if the name is already in a list. I get an error list 'object not callable'. An image of my code is attached.
LindaK
  • 21
  • 3
-2
votes
2 answers

python 'int' object is not callable

I am getting the python error "TypeError: 'int' object is not callable", which I understand to mean that I am accidentally putting parentheses directly after a variable or something like that, but I don't see that in my code. My code is numFather =…
-2
votes
2 answers

Python AttributeError: 'NoneType'

I am doing some code for a flash Card quiz, however when I am running the program it says TypeError: 'NoneType' object is not callable in this line: letter = print("Enter letter of your choice (A B C): ").upper()
-3
votes
1 answer

module object is note callable, Siamese neural network

im trying siamese neural network with this site. but i got error like this... i've tried to call con_model but it still give error i dont know much about siamese or keras or neural network. im just trying and learn. any body can help me to solve…
-3
votes
2 answers

TypeError: 'int' object is not callable and I don't know why

I got the above error on this code and I do not know why: P=input('P=') r=input('r=') n=input('n=') t=input('t=') P=int (P) r=float (r) n=int (n) t=int (t) A=P(1+(r/n))^(n*t) print("A=",A)
daddy
  • 9
  • 2
-3
votes
1 answer

'int' object is not callable error

Hello I am currently having trouble with one of my current homework assignments for python. I'm in the process of making a calorie counter and following along with my instructors videos he made and provided for us. I have all my code complete and…
Austin7887
  • 11
  • 1
-3
votes
1 answer

Int is not callable

I have researched this subject, and cannot find a relevant answer, here's my code: #Imports# import random from operator import add, sub, mul import time from random import choice #Random Numbers# beg1 = random.randint(1, 10) beg2 =…
1 2 3
43
44