From b8ea4746d4d3ece5ceafe4773659b6ae2184390a Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 28 May 2026 22:14:14 +0100 Subject: [PATCH] docs(chapter_1): add missing imports to tutorial_0_visualization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tutorial used `Path("dataset") / "imaging" / "simple__no_lens_light"` and `al.Imaging.from_fits(...)` but had no imports of `Path`, `al`, or `aplt`. Crashed at line 41 with `NameError: name 'Path' is not defined` (NEEDS_FIX-parked 48 days). Add the three missing imports in the literate-style position just before the first use, matching the convention of other tutorials in this chapter. Path import now lets the script progress past the NameError; the script then hits a separate `FileNotFoundError` because no simulator in `scripts/simulator/` matches the `simple__no_lens_light` dataset name. That's a separate cluster (HowTo simulator-path mismatches across ~14 tutorials) — out of scope for this hotfix. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/chapter_1_introduction/tutorial_0_visualization.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/chapter_1_introduction/tutorial_0_visualization.py b/scripts/chapter_1_introduction/tutorial_0_visualization.py index da36a34..e59704b 100644 --- a/scripts/chapter_1_introduction/tutorial_0_visualization.py +++ b/scripts/chapter_1_introduction/tutorial_0_visualization.py @@ -38,6 +38,11 @@ There are many example simulated images of strong lenses in this directory that will be used throughout the **HowToLens** lectures. """ +from pathlib import Path + +import autolens as al +import autolens.plot as aplt + dataset_path = Path("dataset") / "imaging" / "simple__no_lens_light" """