Skip to content

Commit 707ba03

Browse files
committed
Fix analyze_expense taking s3_output_path despite it not being supported
1 parent e9da3b0 commit 707ba03

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

textractor/textractor.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -635,16 +635,13 @@ def analyze_id(
635635
def analyze_expense(
636636
self,
637637
file_source: Union[str, List[Image.Image], List[str]],
638-
s3_output_path: str = "",
639638
save_image: bool = True,
640639
):
641640
"""Make a call to the SYNC AnalyzeExpense API, implicitly parses the response and produces a :class:`Document` object.
642641
This function is ideal for multipage PDFs or list of images.
643642
644643
:param file_source: Path to a file stored locally, on an S3 bucket or PIL Image
645644
:type file_source: Union[str, List[Image.Image], List[str]]
646-
:param s3_output_path: S3 output path. When used the job output is save to the given S3 path, defaults to ""
647-
:type s3_output_path: str, optional
648645
:param save_image: Whether to keep the file source as PIL Images inside the returned Document object, defaults to False
649646
:type save_image: bool, optional
650647
:raises IncorrectMethodException: Raised when the file source type is incompatible with the Textract API being called
@@ -682,11 +679,7 @@ def analyze_expense(
682679
images = []
683680
raise InputError("Input file_source format not supported.")
684681

685-
if not s3_output_path:
686-
output_config = None
687-
else:
688-
bucket, prefix = s3_path_to_bucket_and_prefix(s3_output_path)
689-
output_config = OutputConfig(s3_bucket=bucket, s3_prefix=prefix)
682+
output_config = None
690683

691684
try:
692685
response = call_textract_expense(

0 commit comments

Comments
 (0)