About 17,500 results
Open links in new tab
  1. Python ValueError Exception - W3Schools

    Definition and Usage The ValueError exception occurs if a function receives a value of wrong type. You can handle the ValueError in …

  2. ValueError Exceptions In Python - GeeksforGeeks

    Jul 1, 2026 · A ValueError occurs when a function receives an argument of the correct data type but with an invalid value. In other …

  3. Python ValueError: Exception Handling Examples & Fixes

    Jun 2, 2026 · You now know what triggers a ValueError, where it sits in the Python exception hierarchy, and how to handle it …

  4. Manually raising (throwing) an exception in Python

    How do I raise an exception in Python so that it can later be caught via an except block?

  5. ValueError | Python’s Built-in Exceptions – Real Python

    ValueError ValueError is a built-in exception that gets raised when a function or operation receives an argument of the correct type, …

  6. Python Try Except - GeeksforGeeks

    Jun 8, 2026 · A try statement can contain multiple except blocks to handle different types of errors. Common Exception Errors …

  7. Using try-except to Catch ValueError in Python - PyTutorial

    May 19, 2025 · Handling errors is key in Python programming. The ValueError is common when data conversion fails. Using try …

  8. 8. Errors and ExceptionsPython 3.14.7 documentation

    3 days ago · There are (at least) two distinguishable kinds of errors: syntax errors and exceptions. 8.1. Syntax Errors ¶ Syntax errors, …

  9. Built-in ExceptionsPython 3.14.7 documentation

    2 days ago · In Python, all exceptions must be instances of a class that derives from BaseException. In a try statement with an …

  10. Python Try Except - W3Schools

    Since the try block raises an error, the except block will be executed. Without the try block, the program will crash and raise an error: