[Django]-Django: TypeError: 'tuple' object is not callable

82👍

You’re missing comma (,) inbetween:

>>> ((1,2) (2,3))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object is not callable

Put comma:

>>> ((1,2), (2,3))
((1, 2), (2, 3))

1👍

There is comma missing in your tuple.

insert the comma between the tuples
as shown:

pack_size = (('1', '1'),('3', '3'),(b, b),(h, h),(d, d), (e, e),(r, r))

Do the same for all

0👍

Tuple needs commas between values as shown below:

myTuple = (("a", "b"), (1, 2))
               ↑     ↑   ↑
           # Commas are needed

In addition, this below is Tuple type:

myTuple = (("a", "b"))

And these below are also Tuple type:

myTuple = (("a",))
myTuple = (("a"),)
myTuple = (("a",),)
myTuple = ((),)
myTuple = (())

But, this below is not Tuple. This below is String type:

myTuple = (("a"))

And this below causes error:

myTuple = ((,))

Leave a comment