I tried to recreate your error with the following minimal example (with three input files a.txt, b.txt and c.txt), but it worked fine. Does this work for you as well, and if so, could you tell us the difference to your code?
all_samples = ["a","b","c"]
rule all:
input:
"coverage_plot.png"
rule test:
input:
expand("{sample}.txt",sample=all_samples)
output:
"coverage_plot.png"
shell:
"""
echo {input}
"""