'There are no images open', ImageJ, Python-3x

I am encountering an annoying issue when I run the code below I am given ‘There are no images open’.

I use the following python script to run an imageJ macro:

IJ.open(fin_fus)
IJ.saveAs("tiff", sav_dir_fu)
IJ.runMacroFile(lord_s_path + "\Macro_All_.ijm", str(ch_no))
IJ.saveAs("tiff", sav_dir_pro)
print("Processing successful")

I run the macro (below, not in full for simplification) in headless mode, and “Fn”, “ch_no” and “processing composite” are all printed, so I presume that the image has been found but whenever I run this I get “There are no images open” as an error. Does anyone know how to fix this? There are similar questions on here but none had an answer which solved my troubles so sorry in advance if this is a potential repeat.
Extra info: it works fine when I just run it from the imageJ console on a single image.

Fn = getTitle()
print(Fn)
ch_no = getArgument()
print(ch_no)
if (is("composite")){
print("processing composite");
//run("Channels Tool...");
Stack.setDisplayMode("color");
Stack.setChannel(1);
run("Red");
Stack.setChannel(2);
run("Green");
Stack.setChannel(3);
run("Magenta");
Stack.setChannel(4);
run("Cyan");
Stack.setChannel(1);
run("Enhance Contrast", "saturated=0.35");
Stack.setChannel(2);
run("Enhance Contrast", "saturated=0.35");
Stack.setChannel(3);
run("Enhance Contrast", "saturated=0.35");
Stack.setChannel(4);
run("Enhance Contrast", "saturated=0.35");
run("Rotate 90 Degrees Right");
run("Properties...", "unit=um pixel_width=0.3250000 pixel_height=0.3250000 voxel_depth=3.4000000");