<jupyter_start><jupyter_text>Errors and Debugging<jupyter_code>def func1(a, b):
    return a / b

def func2(x):
    a = x
    b = x - 1
    return func1(a, b)
func2(1)
%xmode Plain
func2(1)
%xmode Verbose
func2(1)
%debug
%debug
%xmode Plain
%pdb on
func2(1)<jupyter_output>Exception reporting mode: Plain
Automatic pdb calling has been turned ON
{'fraction_non_alphanumeric': 0.1072463768115942, 'fraction_numerical': 0.034782608695652174, 'mean_word_length': 4.323076923076923, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '617620', 'license': 'MIT', 'n_tokens_mistral': 151, 'n_tokens_neox': 145, 'n_words': 42, 'path': 'code_listings/01.06-Errors-and-Debugging.ipynb', 'repo_name': 'cesar-rocha/PythonDataScienceHandbook', 'size': '345'}