Skip to content

Commit 864a386

Browse files
author
Wu Jianxiao
committed
Use bash cell for cli command in docs
1 parent e6bb7fa commit 864a386

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docs/source/tutorial/3-troubleshooting.ipynb

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@
154154
"source": [
155155
"from pydra.tasks.testing import Divide\n",
156156
"from pydra.utils.general import default_run_cache_root\n",
157-
"import subprocess\n",
158157
"\n",
159158
"if __name__ == \"__main__\":\n",
160159
" divide = Divide(x=15, y=0)\n",
@@ -163,8 +162,18 @@
163162
" except Exception:\n",
164163
" pass\n",
165164
"\n",
166-
" errorfile = default_run_cache_root / divide._checksum / \"_error.pklz\"\n",
167-
" subprocess.run([\"pydracli\", \"crash\", str(errorfile)])"
165+
" errorfile = default_run_cache_root / divide._checksum / \"_error.pklz\""
166+
]
167+
},
168+
{
169+
"cell_type": "code",
170+
"execution_count": null,
171+
"metadata": {},
172+
"outputs": [],
173+
"source": [
174+
"%%bash -s \"$errorfile\"\n",
175+
"\n",
176+
"pydracli crash $1"
168177
]
169178
},
170179
{

0 commit comments

Comments
 (0)