
The NoneType object is not callable error means you are trying to “call” a variable (by putting () after it) as if it were a function, but the variable is actually None.
The Cause
This almost always happens when you think you have a function, but you actually have None. This can be for two main reasons.
1. A Function Forgot to return a Function
This is common in decorators or advanced code.
def my_decorator():
# ... some logic ...
# Whoops, forgot to return the wrapper function!
pass
@my_decorator
def say_hello(): # 'say_hello' is now None
print("Hello")
say_hello() # CRASH! TypeError: 'NoneType' object is not callable2. A Variable You Think is a Function is None
You might misspell a variable name or, more commonly, a class method.
Problem Code:
my_list = [1, 2, 3]
# We want to sort the list, but we accidentally try to assign
# the .sort() method to a variable.
my_sorter = my_list.sort() # .sort() modifies IN-PLACE and returns None!
print(my_sorter) # Output: None
my_sorter() # CRASH! 'NoneType' object is not callableThe Fix: Check your code! Find the variable you’re trying to call. print() its value just before the line that crashes. You’ll see that it’s None, and you can trace back why it’s not the function you were expecting.




![3D illustration of a file path blocked by illegal characters causing an OSError [Errno 22] Invalid Argument in Python.](https://pythonprohub.com/wp-content/uploads/2026/01/fix-oserror-errno-22-invalid-argument-file-paths-768x429.png)
