Commit 136403b
committed
This avoids parsing the wrong file to display the error.
Py_CompileString(..., ..., Py_file_input) parses the file to display the traceback error. I don't know why if it cannot get the file, then it uses the inline script import. Thus, it is displaying the wrong traceback, because it is parsing the wrong file.
To avoid that, I set the file name to <In [1]>, so when executing codes in Jupyter, it is displaying the error correctly.1 parent 211a97c commit 136403b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
0 commit comments