forked from 0xWheatyz/SPARC
Fix: analyze_single_patent must download the PDF before attempting to read it from disk #365
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
analyze_single_patentconstructs a local pathpatents/{patent_id}.pdfand reads from disk, but does not download the PDF first. If the file is not already present, the method fails silently or raises an unhandled exception.Work
serp_api.pyor a downloader module).analyze_single_patentbefore attempting to open the file.FileNotFoundErrorwith a helpful message instead of a generic crash.Acceptance Criteria
analyze_single_patentwith a patent ID that has no local PDF either downloads it automatically or raises a clear, actionable error.Reference
Roadmap item: P2 Backend —
analyze_single_patentassumes local file path.[Triage] Already implemented in main. analyzer.py (lines ~113-146) implements auto-download logic for patent PDFs when not found on disk. Closing as resolved.