MCPcopy Create free account
hub / github.com/InternScience/InternAgent / info_traceback

Function info_traceback

internagent/experiments_utils_iflow.py:61–75  ·  view source on GitHub ↗
(stderr)

Source from the content-addressed store, hash-verified

59
60# return (file, line, function, content), message
61def info_traceback(stderr):
62 pattern = r'File "(.*)", line (\d+), in (.+)\n (.*)'
63 matches = re.findall(pattern, stderr)
64 match = re.search(rf'\w*Error\w*(.*)', stderr, re.DOTALL)
65 message = match.group(1).strip() if match else "Unknown error"
66 externel = []
67 for match in matches:
68 if match[0].split('/')[-1] == 'experiment.py':
69 continue
70 else:
71 externel.append(match)
72 for e in externel:
73 matches.remove(e)
74
75 return matches, message
76
77
78class IFlowCodeRunner:

Callers 1

run_experimentFunction · 0.70

Calls 2

searchMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected