{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/11920","labels_url":"https://api.github.com/repos/pydata/pandas/issues/11920/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/11920/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/11920/events","html_url":"https://github.com/pydata/pandas/pull/11920","id":124160677,"number":11920,"title":"Raise exception when sqlalchemy is required for database string URI","user":{"login":"ksindi","id":2092714,"avatar_url":"https://avatars.githubusercontent.com/u/2092714?v=3","gravatar_id":"","url":"https://api.github.com/users/ksindi","html_url":"https://github.com/ksindi","followers_url":"https://api.github.com/users/ksindi/followers","following_url":"https://api.github.com/users/ksindi/following{/other_user}","gists_url":"https://api.github.com/users/ksindi/gists{/gist_id}","starred_url":"https://api.github.com/users/ksindi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksindi/subscriptions","organizations_url":"https://api.github.com/users/ksindi/orgs","repos_url":"https://api.github.com/users/ksindi/repos","events_url":"https://api.github.com/users/ksindi/events{/privacy}","received_events_url":"https://api.github.com/users/ksindi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/IO%20SQL","name":"IO SQL","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-29T04:09:22Z","updated_at":"2016-01-06T17:50:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pydata/pandas/pulls/11920","html_url":"https://github.com/pydata/pandas/pull/11920","diff_url":"https://github.com/pydata/pandas/pull/11920.diff","patch_url":"https://github.com/pydata/pandas/pull/11920.patch"},"body":"* I get a cryptic error `AttributeError: 'str' object has no attribute 'cursor'` if sqlalchemy is not installed and I pass a database string URI to `pandas.read_sql`. I think the error should be made more explicit.\r\n* Also I think there is a shadowing issue with` _SQLALCHEMY_INSTALLED` in `_engine_builder`.\r\n\r\n```\r\n/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)\r\n    427     return pandas_sql.read_query(\r\n    428         sql, index_col=index_col, params=params, coerce_float=coerce_float,\r\n--> 429         parse_dates=parse_dates, chunksize=chunksize)\r\n    430 \r\n    431 \r\n\r\n/opt/conda/lib/python3.4/site-packages/pandas/io/sql.py in read_query(self, sql, index_col, coerce_float, params, parse_dates, chunksize)\r\n   1569 \r\n   1570         args = _convert_params(sql, params)\r\n-> 1571         cursor = self.execute(*args)\r\n   1572         columns = [col_desc[0] for col_desc in cursor.description]\r\n   1573 \r\n\r\n/opt/conda/lib/python3.4/site-packages/pandas/io/sql.py in execute(self, *args, **kwargs)\r\n   1532             cur = self.con\r\n   1533         else:\r\n-> 1534             cur = self.con.cursor()\r\n   1535         try:\r\n   1536             if kwargs:\r\n\r\nAttributeError: 'str' object has no attribute 'cursor'\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/169402384","html_url":"https://github.com/pydata/pandas/pull/11920#issuecomment-169402384","issue_url":"https://api.github.com/repos/pydata/pandas/issues/11920","id":169402384,"user":{"login":"ksindi","id":2092714,"avatar_url":"https://avatars.githubusercontent.com/u/2092714?v=3","gravatar_id":"","url":"https://api.github.com/users/ksindi","html_url":"https://github.com/ksindi","followers_url":"https://api.github.com/users/ksindi/followers","following_url":"https://api.github.com/users/ksindi/following{/other_user}","gists_url":"https://api.github.com/users/ksindi/gists{/gist_id}","starred_url":"https://api.github.com/users/ksindi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksindi/subscriptions","organizations_url":"https://api.github.com/users/ksindi/orgs","repos_url":"https://api.github.com/users/ksindi/repos","events_url":"https://api.github.com/users/ksindi/events{/privacy}","received_events_url":"https://api.github.com/users/ksindi/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T17:50:57Z","updated_at":"2016-01-06T17:50:57Z","body":"@jreback Haven't had a chance to work on it. Hope to do so tonight (EST)."}}