← Back to Error Guide
NameError

How to Fix NameError

Understanding and resolving NameError in Python

What is NameError?

A NameError occurs when Python cannot find a variable or function with the specified name.

Common Causes

Common causes of this error...

How to Fix

Wrong Code

# Code that causes the error
print(value)

Correct Code

# Fixed code
value = 10
print(value)

More Python Error Guides