(stderr)
| 65 | |
| 66 | |
| 67 | def info_traceback(stderr): |
| 68 | pattern = r'File "(.*)", line (\d+), in (.+)\n (.*)' |
| 69 | matches = re.findall(pattern, stderr) |
| 70 | match = re.search(rf'\w*Error\w*(.*)', stderr, re.DOTALL) |
| 71 | message = match.group(1).strip() if match else "Unknown error" |
| 72 | externel = [] |
| 73 | for match in matches: |
| 74 | if match[0].split('/')[-1] == 'experiment.py': |
| 75 | continue |
| 76 | else: |
| 77 | externel.append(match) |
| 78 | for e in externel: |
| 79 | matches.remove(e) |
| 80 | |
| 81 | return matches, message |
| 82 | |
| 83 | |
| 84 | class ClaudeCodeRunner: |
no test coverage detected