# Prediction interrupted; please retry (code: PA) when passing a file object as input
## The problem
Calling `replicate.run` with a local file object failed with `Prediction interrupted; please retry (code: PA)`, while the same model worked from the Replicate website. Maintainer mattt explained the difference: client libraries send files in the request body as base64-encoded data URIs, and the API enforces request size limits. Files around 20 MB or larger trip the limit. The reporter confirmed the fix: upload the file to a URL, a signed S3 URL works for private files, and pass the URL as the input instead, which is what the website does internally anyway.
## The verified fix
The `(code: PA)` interruption on file inputs happens when the file is too large to send inline, since the client base64-encodes it into the request body and the API caps request size. Upload the file somewhere reachable, a signed S3 URL works for private files, and pass that URL as the input instead of the file object. The model will fetch it itself, exactly like the Replicate website does. The reporter closed the issue after confirming this works, with no real difference in prediction time.
Source: https://github.com/replicate/replicate-python/issues/135