Skip to content

Commit 8658d1c

Browse files
committed
Silence import-time warnings from pydub
Move warnings.filterwarnings("ignore") to before the module imports so pydub's missing-ffmpeg RuntimeWarning, emitted when markitdown pulls it in, is suppressed. The existing post-import call is kept because markitdown clobbers the filter state during its own import.
1 parent 4340dde commit 8658d1c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

openkb/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""OpenKB CLI — command-line interface for the knowledge base workflow."""
22
from __future__ import annotations
33

4+
# Silence import-time warnings (e.g. pydub's missing-ffmpeg warning emitted
5+
# when markitdown pulls it in). markitdown later clobbers the filters during
6+
# its own import, so we re-apply after all imports below.
7+
import warnings
8+
warnings.filterwarnings("ignore")
9+
410
import asyncio
511
import json
612
import logging

0 commit comments

Comments
 (0)