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 ,
@@ -902,7 +905,10 @@ def pandasSQL_builder(
902905 sqlalchemy  =  import_optional_dependency ("sqlalchemy" , errors = "ignore" )
903906
904907 if  isinstance (con , str ) and  sqlalchemy  is  None :
905-  raise  ImportError ("Using URI string without sqlalchemy installed." )
908+  raise  ImportError (
909+  f"Using URI string without version '{ VERSIONS ['sqlalchemy' ]}  
910+  "of 'sqlalchemy' installed." 
911+  )
906912
907913 if  sqlalchemy  is  not None  and  isinstance (con , (str , sqlalchemy .engine .Connectable )):
908914 return  SQLDatabase (con , schema , need_transaction )
                         You can’t perform that action at this time. 
           
                  
0 commit comments