pylinac icon indicating copy to clipboard operation
pylinac copied to clipboard

ACR Phantoms publish_pdf logo error

Open djp82645 opened this issue 1 year ago • 1 comments

image If there is no local network, an error is reported if the local logo address is used can change it? self._logo = logo if logo else get_logo()

djp82645 avatar Jun 27 '24 07:06 djp82645

It's looking for the file locally first, so the easiest solution would be to download the image from here: https://github.com/jrkerns/pylinac/blob/master/pylinac/core/pdf.py#L28 and place it here: https://github.com/jrkerns/pylinac/blob/master/pylinac/core/pdf.py#L23. If you can change the source code you could also add a print statement in that function to see exactly where it's looking (it's in your site-packages of your environment).

print(f"Looking for logo file at {Path(__file__).parent.parent / 'files'}")
logo_file = Path(__file__).parent.parent / "files" / "Pylinac-GREEN.png"

If you can't edit your environment you can also download the logo or use your own and pass it directly:

instance.publish_pdf(..., logo=Path("my_awesome_logo.png"))

jrkerns avatar Jun 27 '24 15:06 jrkerns