diff --git a/lightrag/kg/age_impl.py b/lightrag/kg/age_impl.py index 243a110b..cb28ab6f 100644 --- a/lightrag/kg/age_impl.py +++ b/lightrag/kg/age_impl.py @@ -23,7 +23,6 @@ from ..base import BaseGraphStorage if sys.platform.startswith("win"): import asyncio.windows_events - asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) @@ -34,15 +33,9 @@ if not pm.is_installed("psycopg-pool"): if not pm.is_installed("asyncpg"): pm.install("asyncpg") -try: - import psycopg - from psycopg.rows import namedtuple_row - from psycopg_pool import AsyncConnectionPool, PoolTimeout -except ImportError: - raise ImportError( - "`psycopg-pool, psycopg[binary,pool], asyncpg` library is not installed. Please install it via pip: `pip install psycopg-pool psycopg[binary,pool] asyncpg`." - ) - +import psycopg +from psycopg.rows import namedtuple_row +from psycopg_pool import AsyncConnectionPool, PoolTimeout class AGEQueryException(Exception): """Exception for the AGE queries."""