mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-28 09:28:48 +00:00
Fix import (#9945)
This commit is contained in:
parent
8bd7a9d18e
commit
fbd792ac7c
@ -37,7 +37,7 @@ class IMessageChatLoader(chat_loaders.BaseChatLoader):
|
|||||||
if not self.db_path.exists():
|
if not self.db_path.exists():
|
||||||
raise FileNotFoundError(f"File {self.db_path} not found")
|
raise FileNotFoundError(f"File {self.db_path} not found")
|
||||||
try:
|
try:
|
||||||
pass # type: ignore
|
import sqlite3 # noqa: F401
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"The sqlite3 module is required to load iMessage chats.\n"
|
"The sqlite3 module is required to load iMessage chats.\n"
|
||||||
@ -93,6 +93,7 @@ class IMessageChatLoader(chat_loaders.BaseChatLoader):
|
|||||||
Yields:
|
Yields:
|
||||||
ChatSession: Loaded chat session.
|
ChatSession: Loaded chat session.
|
||||||
"""
|
"""
|
||||||
|
import sqlite3
|
||||||
|
|
||||||
try:
|
try:
|
||||||
conn = sqlite3.connect(self.db_path)
|
conn = sqlite3.connect(self.db_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user