Skip to content

Commit 5d2117e

Browse files
author
Wu Jianxiao
committed
Make sure to generate error file in docs
1 parent 93b3310 commit 5d2117e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/source/tutorial/3-troubleshooting.ipynb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,19 @@
152152
"metadata": {},
153153
"outputs": [],
154154
"source": [
155-
"%%bash\n",
155+
"from pydra.tasks.testing import Divide\n",
156+
"from pydra.utils.general import default_run_cache_root\n",
157+
"import subprocess\n",
156158
"\n",
157-
"pydracli crash _error.pklz --rerun --debugger pdb"
159+
"if __name__ == \"__main__\":\n",
160+
" divide = Divide(x=15, y=0)\n",
161+
" try:\n",
162+
" divide(cache_root=default_run_cache_root)\n",
163+
" except Exception:\n",
164+
" pass\n",
165+
"\n",
166+
" errorfile = default_run_cache_root / divide._checksum / \"_error.pklz\"\n",
167+
" subprocess.run([\"pydracli\", \"crash\", str(errorfile)])"
158168
]
159169
},
160170
{

0 commit comments

Comments
 (0)