Last modified: Dec 06, 2025 By Alexander Williams

Fix TypeError: 'ellipsis' object is not callable

Python errors can be confusing. The "TypeError: 'ellipsis' object is not callable" is one such error. It often puzzles beginners.

This error means you tried to use the Ellipsis object like a function. You used parentheses after it. But Ellipsis is not a callable function.

This guide explains the error. You will learn what causes it. You will also learn how to fix it quickly.

What is the Ellipsis Object?

Ellipsis is a built-in constant in Python. It is represented by three dots: .... It is also available as Ellipsis.

Its primary use is in extended slicing for NumPy arrays. It can also serve as a placeholder in code. Think of it as a "to be filled later" marker.

Here is how you can see it.


# Exploring the Ellipsis object
print(...)          # Prints the Ellipsis
print(type(...))    # Shows its type
print(Ellipsis)     # The named constant

Ellipsis
<class 'ellipsis'>
Ellipsis

The output shows ... is of type <class 'ellipsis'>. It is a singleton object, not a function.

Common Cause: Misplaced Parentheses

The main cause is simple. You put parentheses () right after the three dots. Python thinks you want to call it as a function.

This often happens by accident. You might be typing quickly. Or you might be copying code with a syntax error.

Look at this erroneous example.


# This will cause the TypeError
result = ...()  # Trying to call Ellipsis as a function

TypeError: 'ellipsis' object is not callable

The error is clear. The ellipsis object does not support being called. The parentheses are the problem.

How to Fix the Error

The fix depends on what you intended to do. The solution is to remove the mistaken function call.

Solution 1: Remove the Erroneous Parentheses

If you used ... as a placeholder, just use it alone. Do not add parentheses after it.


# Incorrect: Using parentheses
# placeholder = ...()

# Correct: Use Ellipsis without call
placeholder = ...
print(f"Placeholder: {placeholder}")

Placeholder: Ellipsis

Solution 2: Define a Proper Function or Variable

Maybe you meant to write a function or assign a value. You typed ... by mistake. Replace it with your actual code.


# Perhaps you meant this:
def my_function():
    return "Hello World"

value = my_function()  # Correct function call
print(value)

Hello World

Solution 3: Check for Typos in Complex Expressions

Sometimes the error hides in longer lines. Look for a stray ... followed by (). This can happen in list comprehensions or function arguments.


# A more hidden example
data = [1, 2, 3]
# Incorrect: ...() in a list operation
# processed = [x for x in data if ...()]

# Correct: Use a proper condition
processed = [x for x in data if x > 1]
print(processed)

[2, 3]

Understanding "Not Callable" Errors

This error is a specific type of TypeError. It occurs when you try to call a non-function object.

You use parentheses to call a function or method. If the object before the parentheses is not callable, Python raises this error.

Other common "not callable" errors include 'property' object is not callable and 'numpy.ndarray' object is not callable. The principle is the same.

You can check if an object is callable with the callable() built-in function.


print(callable(...))      # False
print(callable(print))    # True
print(callable(len))      # True

False
True
True

Proper Uses of Ellipsis in Python

Knowing the right uses helps avoid the error. Here are valid ways to use Ellipsis.

1. Placeholder in Incomplete Code: Use ... (or the pass statement) as a stub.


def function_to_write_later():
    ...  # TODO: Implement this function

class IncompleteClass:
    ...

2. Extended Slicing in NumPy: It is crucial for multi-dimensional array slicing.


import numpy as np
arr = np.arange(27).reshape(3, 3, 3)
# Use ... to select all in remaining dimensions
slice_result = arr[0, ...]  # Gets the first 3x3 block
print(slice_result.shape)

(3, 3)

3. Type Hinting: In modern Python, ... can denote a default value for a function parameter, especially with typing.


from typing import Callable

def decorator(func: Callable[..., int]) -> Callable[..., int]:
    # The ... indicates arbitrary arguments
    def wrapper(*args, **kwargs):
        return func(*args, **kwargs)
    return wrapper

Debugging Tips

Follow these steps when you see this error.

1. Find the line number in the traceback. Go to that line in your code.

2. Look for the sequence ...(). It is almost always the culprit.

3. Ask what you intended. Did you mean a placeholder? A function call? A variable?

4. Replace or remove the erroneous code. Use a proper function or value.

5. Run your code again to confirm the fix.

Remember, careful typing prevents many errors. Using a good IDE with syntax highlighting also helps.

Relation to Other TypeErrors

Python has many TypeError variations. Understanding one helps with others.

For example, a 'unhashable type: dict' error deals with object mutability. The 'can only concatenate tuple to tuple' error is about type compatibility.

They all stem from operations on incompatible object types. Reading the error message is the first step to solving it.

Conclusion

The "TypeError: 'ellipsis' object is not callable" is a simple mistake. It happens when you accidentally try to call the Ellipsis object.

The fix is to remove the parentheses or replace ... with your intended code. Remember, ... is a constant placeholder, not a function.

Always check for stray parentheses in your code. Use callable() to test objects if unsure. This approach will help you fix this and similar errors quickly.

Keep practicing. Soon, debugging such errors will become second nature.