The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
remove Value error "pyspark is not installed. Please install it with `pip i… (#9723)
Jurik-001d04fe0d3ea55
diff --git a/libs/langchain/langchain/utilities/spark_sql.py b/libs/langchain/langchain/utilities/spark_sql.pyindex ffecbe511d..20c1e8e5b2 100644--- a/libs/langchain/langchain/utilities/spark_sql.py+++ b/libs/langchain/langchain/utilities/spark_sql.py@@ -179,14 +179,8 @@ class SparkSQL:If the statement throws an error, the error message is returned."""- try:- from pyspark.errors import PySparkException- except ImportError:- raise ValueError(- "pyspark is not installed. Please install it with `pip install pyspark`"- )try:return self.run(command, fetch)- except PySparkException as e:+ except Exception as e:"""Format the error message"""return f"Error: {e}"