Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 439 Bytes

File metadata and controls

31 lines (20 loc) · 439 Bytes

TypeError: missing 1 required positional argument

Occurs when a function is called without required arguments.

reproduce.py

def greet(name):
    print("Hello", name)

greet()

Error Message

TypeError: greet() missing 1 required positional argument: 'name'

Fix

def greet(name):
    print("Hello", name)

greet("Python")

Reflection

Called the function without the required argument.