From 521dbf2be15f9510a0547c042b22bcab737d45d2 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 19 Feb 2025 19:50:46 +0100 Subject: [PATCH] Update postgres_impl.py --- lightrag/kg/postgres_impl.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lightrag/kg/postgres_impl.py b/lightrag/kg/postgres_impl.py index a9c4b3b7..874c6f22 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -38,15 +38,8 @@ import pipmaster as pm if not pm.is_installed("asyncpg"): pm.install("asyncpg") -try: - import asyncpg - from asyncpg import Pool - -except ImportError as e: - raise ImportError( - "`asyncpg` library is not installed. Please install it via pip: `pip install asyncpg`." - ) from e - +import asyncpg +from asyncpg import Pool class PostgreSQLDB: def __init__(self, config: dict[str, Any], **kwargs: Any):