Skip to content

Commit 72391b4

Browse files
committed
Pass in binary file obj for detecting extractor cls instead
1 parent eab27a5 commit 72391b4

File tree

3 files changed

+520
-380
lines changed

3 files changed

+520
-380
lines changed

beanhub_import/processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def process_imports(
604604
else None
605605
)
606606
if extractor_name is None:
607-
with filepath.open("rt") as fo:
607+
with filepath.open("rb") as fo:
608608
extractor_cls = detect_extractor(fo)
609609
if extractor_cls is None:
610610
raise ValueError(

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies = [
1111
"pydantic>= 2.0.0, <3.0.0",
1212
"pyyaml>=6.0.1,<7",
1313
"jinja2>=3.1.5,<4",
14-
"beanhub-extract>= 0.1.0, <0.2.0",
14+
"beanhub-extract>= 0.1.7, <0.2.0",
1515
"beancount-black>= 1.0.2, < 1.1.0",
1616
"beancount-parser>= 1.2.3, < 1.3.0",
1717
]

0 commit comments

Comments
 (0)