(traceback_str)
| 6 | SITE_PKG_ERROR_PREFIX = f'File {PYTHON_PREFIX}/lib/python3.10/' |
| 7 | |
| 8 | def get_error_header(traceback_str): |
| 9 | lines = traceback_str.split('\n') |
| 10 | for line in lines: |
| 11 | if 'Error:' in line: |
| 12 | return line |
| 13 | return '' # Return None if no error message is found |
| 14 | |
| 15 | def clean_error_msg(error_str:str =''): |
| 16 | filtered_error_msg = error_str.__str__().split('An error occurred while executing the following cell')[-1].split("\n------------------\n")[-1] |