Back to Python Errors
Python Exception

ValueError

Invalid value

What does this error mean?

Occurs when a function receives the correct type but an inappropriate value.

How to fix ValueError?

Validate input values. Check the expected value range or format.

Example
int('abc') # ValueError: invalid literal for int() with base 10: 'abc'