File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3535from pandas ._config import using_string_dtype
3636
3737from pandas ._libs import lib
38- from pandas .compat ._optional import import_optional_dependency
38+ from pandas .compat ._optional import (
39+ VERSIONS ,
40+ import_optional_dependency ,
41+ )
3942from pandas .errors import (
4043 AbstractMethodError ,
4144 DatabaseError ,
@@ -898,7 +901,10 @@ def pandasSQL_builder(
898901 sqlalchemy = import_optional_dependency ("sqlalchemy" , errors = "ignore" )
899902
900903 if isinstance (con , str ) and sqlalchemy is None :
901- raise ImportError ("Using URI string without sqlalchemy installed." )
904+ raise ImportError (
905+ f"Using URI string without version '{ VERSIONS ['sqlalchemy' ]} ' or newer "
906+ "of 'sqlalchemy' installed."
907+ )
902908
903909 if sqlalchemy is not None and isinstance (con , (str , sqlalchemy .engine .Connectable )):
904910 return SQLDatabase (con , schema , need_transaction )
You can’t perform that action at this time.
0 commit comments