ignore error python code example
Example 1: ignore warnings python
import warnings
warnings.filterwarnings("ignore")
Example 2: python request remove warning
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
Example 3: How do I ignore an error in Python?
Add Source
Use pass to ignore an exception
Within a try and except block, use pass in the except clause to indicate no action is required in handling the caught exception.