ENH: raise exception when sqlalchemy is required for database string URI by ksindi · Pull Request #11920 · pandas-dev/pandas (original) (raw)
/opt/conda/lib/python3.4/site-packages/pandas/io/sql.py in read_sql_query(sql, con, index_col, coerce_float, params, parse_dates, chunksize)
427 return pandas_sql.read_query(
428 sql, index_col=index_col, params=params, coerce_float=coerce_float,
--> 429 parse_dates=parse_dates, chunksize=chunksize)
430
431
/opt/conda/lib/python3.4/site-packages/pandas/io/sql.py in read_query(self, sql, index_col, coerce_float, params, parse_dates, chunksize)
1569
1570 args = _convert_params(sql, params)
-> 1571 cursor = self.execute(*args)
1572 columns = [col_desc[0] for col_desc in cursor.description]
1573
/opt/conda/lib/python3.4/site-packages/pandas/io/sql.py in execute(self, *args, **kwargs)
1532 cur = self.con
1533 else:
-> 1534 cur = self.con.cursor()
1535 try:
1536 if kwargs:
AttributeError: 'str' object has no attribute 'cursor'