Open faruqsandi opened 1 month ago
Input file is missing: /home/bit/Playground/xnalabs/pori_suite/mutationBurden.density_snv.primary.png The error is showing this file as missing or inaccessible.
Are read permissions restricted on that file? Is the directory correct.
Yes, paths are guaranteed to be OK and accessible using terminal.
My current workaround is to remove the "images" from the payload for individual upload after report created.
images = report_payload.pop()
ipr_conn = IprConnection(
username=username, password=password, url=myurl
)
for image in images:
image_key = image["key"]
files = {
f"{image_key}": image["path"],
}
data = {
f"{image_key}.title": image["title"],
f"{image_key}.caption": image["caption"],
}
try:
response_image = ipr_conn.post_images(
report_id=report_id, files=files, data=data
)
print(image_key, response_image)
except Exception:
print(f"Failed to upload image {image_key}")
continue
Here is my json: example_report.json
Describe the bug Unable to upload images for the report when calling
ipr_report
.To Reproduce Steps to reproduce the behavior:
ipr_report
Expected behaviour I expected that the image would be successfully uploaded. I see that function
post_images
never actually called besides in test cases.Versions (please complete the following information): - OS: Windows 11, WSL 2, Ubuntu 22.04.4 LTS. - Python: 3.11.9 - Version: pori_python==0.1.2 - GraphKB URL: local - IPR URL: local
Additional context I tried to construct a complete JSON for
ipr_report
that will produce a complete report in each section.