Skip to content

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/databricks-vscode/src/run/ErrorParser.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export function processException(cause: string): Frame[] {
5757
}
5858
const cleanChunk = chunk.replace(/\u001b\[\d+(?:;\d+)*m/g, "");
5959

60-
const match = cleanChunk.match(/^(\/.*?\.py) in\s/u);
60+
const match =
61+
cleanChunk.match(/^(\/.*?\.py) in\s/u) ||
62+
cleanChunk.match(/File (\/.*?\.py)/u);
6163
if (match) {
6264
const lineMatch = cleanChunk.match(/^-+>\s(\d+)/mu);
6365

@@ -82,7 +84,9 @@ function processSyntaxError(cause: string): Frame[] {
8284

8385
for (const chunk of chunks) {
8486
const cleanChunk = chunk.replace(/\u001b\[\d+(?:;\d+)*m/g, "");
85-
const match = cleanChunk.match(/^\s*File\s*"(.*?)", line (\d+)/u);
87+
const match =
88+
cleanChunk.match(/^\s*File\s*"(.*?)", line (\d+)/u) ||
89+
cleanChunk.match(/File (\/.*?\.py):(\d+)/u);
8690
if (match) {
8791
frames.push({
8892
file: match[1],

0 commit comments

Comments
 (0)