cleaned import

This commit is contained in:
Yannick Stephan
2025-02-16 14:45:45 +01:00
parent 3fef8201c6
commit a0844bca28
12 changed files with 16 additions and 18 deletions

View File

@@ -31,10 +31,10 @@ try:
import psycopg
from psycopg.rows import namedtuple_row
from psycopg_pool import AsyncConnectionPool, PoolTimeout
except ImportError as e:
except ImportError:
raise ImportError(
"psycopg-pool, psycopg[binary,pool], asyncpg library is not installed. Please install it to proceed."
) from e
"`psycopg-pool, psycopg[binary,pool], asyncpg` library is not installed. Please install it via pip: `pip install psycopg-pool psycopg[binary,pool] asyncpg`."
)
class AGEQueryException(Exception):

View File

@@ -11,7 +11,7 @@ try:
from chromadb.config import Settings
except ImportError as e:
raise ImportError(
"chromadb library is not installed. Please install it to proceed."
"`chromadb` library is not installed. Please install it via pip: `pip install chromadb`."
) from e

View File

@@ -20,7 +20,7 @@ try:
import faiss
except ImportError as e:
raise ImportError(
"faiss library is not installed. Please install it to proceed."
"`faiss` library is not installed. Please install it via pip: `pip install faiss`."
) from e

View File

@@ -26,7 +26,7 @@ try:
from gremlin_python.driver.protocol import GremlinServerError
except ImportError as e:
raise ImportError(
"gremlin library is not installed. Please install it to proceed."
"`gremlin` library is not installed. Please install it via pip: `pip install gremlin`."
) from e

View File

@@ -26,10 +26,9 @@ try:
from pymongo.errors import PyMongoError
except ImportError as e:
raise ImportError(
"motor, pymongo library is not installed. Please install it to proceed."
"`motor, pymongo` library is not installed. Please install it via pip: `pip install motor pymongo`."
) from e
config = configparser.ConfigParser()
config.read("config.ini", "utf-8")

View File

@@ -20,7 +20,7 @@ try:
from nano_vectordb import NanoVectorDB
except ImportError as e:
raise ImportError(
"nano-vectordb library is not installed. Please install it to proceed."
"`nano-vectordb` library is not installed. Please install it via pip: `pip install nano-vectordb`."
) from e

View File

@@ -29,10 +29,9 @@ try:
)
except ImportError as e:
raise ImportError(
"neo4j library is not installed. Please install it to proceed."
"`neo4j` library is not installed. Please install it via pip: `pip install neo4j`."
) from e
config = configparser.ConfigParser()
config.read("config.ini", "utf-8")

View File

@@ -19,7 +19,7 @@ try:
import networkx as nx
except ImportError as e:
raise ImportError(
"networkx library is not installed. Please install it to proceed."
"`networkx` library is not installed. Please install it via pip: `pip install networkx`."
) from e

View File

@@ -23,7 +23,7 @@ try:
except ImportError as e:
raise ImportError(
"oracledb library is not installed. Please install it to proceed."
"`oracledb` library is not installed. Please install it via pip: `pip install oracledb`."
) from e

View File

@@ -40,7 +40,7 @@ try:
except ImportError as e:
raise ImportError(
"asyncpg, tqdm_async library is not installed. Please install it to proceed."
"`asyncpg` library is not installed. Please install it via pip: `pip install asyncpg`."
) from e

View File

@@ -17,10 +17,10 @@ config.read("config.ini", "utf-8")
try:
from qdrant_client import QdrantClient, models
except ImportError as e:
except ImportError:
raise ImportError(
"qdrant_client library is not installed. Please install it to proceed."
) from e
"`qdrant_client` library is not installed. Please install it via pip: `pip install qdrant-client`."
)
def compute_mdhash_id_for_qdrant(

View File

@@ -18,7 +18,7 @@ try:
except ImportError as e:
raise ImportError(
"pymysql, sqlalchemy library is not installed. Please install it to proceed."
"`pymysql, sqlalchemy` library is not installed. Please install it via pip: `pip install pymysql sqlalchemy`."
) from e