Skip to content

Commit 68a01f6

Browse files
committed
Improve absolute path example
1 parent 33e9b9e commit 68a01f6

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

_episodes/06-debugging.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,25 @@ esmvalcore._task.DiagnosticError: Cannot execute script 'diag_scripts/examples/d
300300
301301
The script path should be relative to ``diag_scripts`` directory. It means that
302302
the script ``diagnostic_timeseries.py`` is located in
303-
``<path_to_esmvaltool>/diag_scripts/ocean/``. Alternatively, the script path can
304-
be an absolute path. To examine this, we change the script path and run the
305-
recipe:
303+
``<path_to_esmvaltool>/diag_scripts/ocean/``.
304+
Alternatively, the script path can be an absolute path. To examine this, we can download the script from the ``ESMValTool`` repository:
305+
306+
```bash
307+
wget https://github.com/ESMValGroup/ESMValTool/blob/master/esmvaltool/diag_scripts/ocean/diagnostic_timeseries.py
308+
```
309+
310+
One way to get the absolute path is to run:
311+
312+
```bash
313+
readlink -f diagnostic_timeseries.py
314+
```
315+
316+
Then we can update the script path and run the recipe:
306317
307318
```yaml
308319
40 scripts:
309320
41 timeseries_diag:
310-
42 script: <path_to_esmvaltool>/diag_scripts/ocean/diagnostic_timeseries.py
321+
42 script: <path_to_script>/diagnostic_timeseries.py
311322
```
312323
313324
~~~bash

0 commit comments

Comments
 (0)