cleaned import
This commit is contained in:
@@ -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):
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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")
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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")
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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(
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user