And I just verified: version 1.1.13 is installed, and loaded for sure just 
checked via sqlalchemy.__version__
Just to be sure.


On Tuesday, September 12, 2017 at 10:14:03 AM UTC-7, dirk.biesinger wrote:
>
> Mike,
>
> I'll post two stacks:
> the first one is just calling the engine.connect():
> the second one (look for a row of #####) is when calling the df.to_sql() 
> function.
>
> 2017-09-12 17:08:23,572 INFO sqlalchemy.engine.base.Engine SELECT 
>  SERVERPROPERTY('ProductVersion')
> 2017-09-12 17:08:23,573 INFO sqlalchemy.engine.base.Engine ()
> 2017-09-12 17:08:23,627 INFO sqlalchemy.engine.base.Engine SELECT 
> schema_name()
> 2017-09-12 17:08:23,627 INFO sqlalchemy.engine.base.Engine ()
> 2017-09-12 17:08:24,056 INFO sqlalchemy.engine.base.Engine SELECT 
> CAST('test plain returns' AS VARCHAR(60)) AS anon_1
> 2017-09-12 17:08:24,057 INFO sqlalchemy.engine.base.Engine ()
> 2017-09-12 17:08:24,117 INFO sqlalchemy.engine.base.Engine SELECT 
> CAST('test unicode returns' AS NVARCHAR(60)) AS anon_1
> 2017-09-12 17:08:24,117 INFO sqlalchemy.engine.base.Engine ()
> ---------------------------------------------------------------------------
> Empty                                     Traceback (most recent call last)
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1121             wait = use_overflow and self._overflow >= 
> self._max_overflow
> -> 1122             return self._pool.get(wait, self._timeout)
>    1123         except sqla_queue.Empty:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/queue.py 
> in get(self, block, timeout)
>     144                 if self._empty():
> --> 145                     raise Empty
>     146             elif timeout is None:
>
> Empty: 
>
> During handling of the above exception, another exception occurred:
>
> ProgrammingError                          Traceback (most recent call last)
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in _wrap_pool_connect(self, fn, connection)
>    2146         try:
> -> 2147             return fn()
>    2148         except dialect.dbapi.Error as e:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> unique_connection(self)
>     327         """
> --> 328         return _ConnectionFairy._checkout(self)
>     329 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _checkout(cls, pool, threadconns, fairy)
>     765         if not fairy:
> --> 766             fairy = _ConnectionRecord.checkout(pool)
>     767 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> checkout(cls, pool)
>     515     def checkout(cls, pool):
> --> 516         rec = pool._do_get()
>     517         try:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1137                     with util.safe_reraise():
> -> 1138                         self._dec_overflow()
>    1139             else:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py
>  
> in __exit__(self, type_, value, traceback)
>      65             if not self.warn_only:
> ---> 66                 compat.reraise(exc_type, exc_value, exc_tb)
>      67         else:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/compat.py 
> in reraise(tp, value, tb, cause)
>     186             raise value.with_traceback(tb)
> --> 187         raise value
>     188 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1134                 try:
> -> 1135                     return self._create_connection()
>    1136                 except:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _create_connection(self)
>     332 
> --> 333         return _ConnectionRecord(self)
>     334 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> __init__(self, pool, connect)
>     460         if connect:
> --> 461             self.__connect(first_connect_check=True)
>     462         self.finalize_callback = deque()
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> __connect(self, first_connect_check)
>     660                     for_modify(pool.dispatch).\
> --> 661                     exec_once(self.connection, self)
>     662             if pool.dispatch.connect:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/event/attr.py 
> in exec_once(self, *args, **kw)
>     245                     try:
> --> 246                         self(*args, **kw)
>     247                     finally:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/event/attr.py 
> in __call__(self, *args, **kw)
>     255         for fn in self.listeners:
> --> 256             fn(*args, **kw)
>     257 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py
>  
> in go(*arg, **kw)
>    1330             once_fn = once.pop()
> -> 1331             return once_fn(*arg, **kw)
>    1332 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py
>  
> in first_connect(dbapi_connection, connection_record)
>     180                 c._execution_options = util.immutabledict()
> --> 181                 dialect.initialize(c)
>     182             event.listen(pool, 'first_connect', first_connect, 
> once=True)
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/connectors/pyodbc.py
>  
> in initialize(self, connection)
>     164         # run other initialization which asks for user name, etc.
> --> 165         super(PyODBCConnector, self).initialize(connection)
>     166 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/dialects/mssql/base.py
>  
> in initialize(self, connection)
>    1741     def initialize(self, connection):
> -> 1742         super(MSDialect, self).initialize(connection)
>    1743         self._setup_version_attributes()
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/default.py
>  
> in initialize(self, connection)
>     265 
> --> 266         self.do_rollback(connection.connection)
>     267 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/default.py
>  
> in do_rollback(self, dbapi_connection)
>     439     def do_rollback(self, dbapi_connection):
> --> 440         dbapi_connection.rollback()
>     441 
>
> ProgrammingError: ('42000', '[42000] [Microsoft][ODBC Driver 13 for SQL 
> Server][SQL Server]111214;An attempt to complete a transaction has failed. 
> No corresponding transaction found. (111214) (SQLEndTran)')
>
> The above exception was the direct cause of the following exception:
>
> ProgrammingError                          Traceback (most recent call last)
> <ipython-input-10-bd43083eb2bb> in <module>()
>      16     dbapi_connection.autocommit = True
>      17 #cnxn = pyodbc.connect(connection_str)
> ---> 18 engn.connect()
>      19 #df.to_sql(tbl_server_out, engn, if_exists='append', index=False)
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in connect(self, **kwargs)
>    2089         """
>    2090 
> -> 2091         return self._connection_cls(self, **kwargs)
>    2092 
>    2093     def contextual_connect(self, close_with_result=False, 
> **kwargs):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in __init__(self, engine, connection, close_with_result, _branch_from, 
> _execution_options, _dispatch, _has_events)
>      88         else:
>      89             self.__connection = connection \
> ---> 90                 if connection is not None else 
> engine.raw_connection()
>      91             self.__transaction = None
>      92             self.__savepoint_seq = 0
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in raw_connection(self, _connection)
>    2175         """
>    2176         return self._wrap_pool_connect(
> -> 2177             self.pool.unique_connection, _connection)
>    2178 
>    2179 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in _wrap_pool_connect(self, fn, connection)
>    2149             if connection is None:
>    2150                 Connection._handle_dbapi_exception_noconnection(
> -> 2151                     e, dialect, self)
>    2152             else:
>    2153                 util.reraise(*sys.exc_info())
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in _handle_dbapi_exception_noconnection(cls, e, dialect, engine)
>    1463             util.raise_from_cause(
>    1464                 sqlalchemy_exception,
> -> 1465                 exc_info
>    1466             )
>    1467         else:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/compat.py 
> in raise_from_cause(exception, exc_info)
>     201     exc_type, exc_value, exc_tb = exc_info
>     202     cause = exc_value if exc_value is not exception else None
> --> 203     reraise(type(exception), exception, tb=exc_tb, cause=cause)
>     204 
>     205 if py3k:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/compat.py 
> in reraise(tp, value, tb, cause)
>     184             value.__cause__ = cause
>     185         if value.__traceback__ is not tb:
> --> 186             raise value.with_traceback(tb)
>     187         raise value
>     188 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in _wrap_pool_connect(self, fn, connection)
>    2145         dialect = self.dialect
>    2146         try:
> -> 2147             return fn()
>    2148         except dialect.dbapi.Error as e:
>    2149             if connection is None:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> unique_connection(self)
>     326 
>     327         """
> --> 328         return _ConnectionFairy._checkout(self)
>     329 
>     330     def _create_connection(self):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _checkout(cls, pool, threadconns, fairy)
>     764     def _checkout(cls, pool, threadconns=None, fairy=None):
>     765         if not fairy:
> --> 766             fairy = _ConnectionRecord.checkout(pool)
>     767 
>     768             fairy._pool = pool
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> checkout(cls, pool)
>     514     @classmethod
>     515     def checkout(cls, pool):
> --> 516         rec = pool._do_get()
>     517         try:
>     518             dbapi_connection = rec.get_connection()
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1136                 except:
>    1137                     with util.safe_reraise():
> -> 1138                         self._dec_overflow()
>    1139             else:
>    1140                 return self._do_get()
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py
>  
> in __exit__(self, type_, value, traceback)
>      64             self._exc_info = None   # remove potential circular 
> references
>      65             if not self.warn_only:
> ---> 66                 compat.reraise(exc_type, exc_value, exc_tb)
>      67         else:
>      68             if not compat.py3k and self._exc_info and 
> self._exc_info[1]:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/compat.py 
> in reraise(tp, value, tb, cause)
>     185         if value.__traceback__ is not tb:
>     186             raise value.with_traceback(tb)
> --> 187         raise value
>     188 
>     189 else:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1133             if self._inc_overflow():
>    1134                 try:
> -> 1135                     return self._create_connection()
>    1136                 except:
>    1137                     with util.safe_reraise():
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _create_connection(self)
>     331         """Called by subclasses to create a new 
> ConnectionRecord."""
>     332 
> --> 333         return _ConnectionRecord(self)
>     334 
>     335     def _invalidate(self, connection, exception=None):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> __init__(self, pool, connect)
>     459         self.__pool = pool
>     460         if connect:
> --> 461             self.__connect(first_connect_check=True)
>     462         self.finalize_callback = deque()
>     463 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> __connect(self, first_connect_check)
>     659                 pool.dispatch.first_connect.\
>     660                     for_modify(pool.dispatch).\
> --> 661                     exec_once(self.connection, self)
>     662             if pool.dispatch.connect:
>     663                 pool.dispatch.connect(self.connection, self)
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/event/attr.py 
> in exec_once(self, *args, **kw)
>     244                 if not self._exec_once:
>     245                     try:
> --> 246                         self(*args, **kw)
>     247                     finally:
>     248                         self._exec_once = True
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/event/attr.py 
> in __call__(self, *args, **kw)
>     254             fn(*args, **kw)
>     255         for fn in self.listeners:
> --> 256             fn(*args, **kw)
>     257 
>     258     def __len__(self):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py
>  
> in go(*arg, **kw)
>    1329         if once:
>    1330             once_fn = once.pop()
> -> 1331             return once_fn(*arg, **kw)
>    1332 
>    1333     return go
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py
>  
> in first_connect(dbapi_connection, connection_record)
>     179                                     _has_events=False)
>     180                 c._execution_options = util.immutabledict()
> --> 181                 dialect.initialize(c)
>     182             event.listen(pool, 'first_connect', first_connect, 
> once=True)
>     183 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/connectors/pyodbc.py
>  
> in initialize(self, connection)
>     163 
>     164         # run other initialization which asks for user name, etc.
> --> 165         super(PyODBCConnector, self).initialize(connection)
>     166 
>     167     def _dbapi_version(self):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/dialects/mssql/base.py
>  
> in initialize(self, connection)
>    1740 
>    1741     def initialize(self, connection):
> -> 1742         super(MSDialect, self).initialize(connection)
>    1743         self._setup_version_attributes()
>    1744 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/default.py
>  
> in initialize(self, connection)
>     264             self._description_decoder = self.description_encoding 
> = None
>     265 
> --> 266         self.do_rollback(connection.connection)
>     267 
>     268     def on_connect(self):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/default.py
>  
> in do_rollback(self, dbapi_connection)
>     438 
>     439     def do_rollback(self, dbapi_connection):
> --> 440         dbapi_connection.rollback()
>     441 
>     442     def do_commit(self, dbapi_connection):
>
> ProgrammingError: (pyodbc.ProgrammingError) ('42000', '[42000] 
> [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]111214;An attempt to 
> complete a transaction has failed. No corresponding transaction found. 
> (111214) (SQLEndTran)')
>
> In [ ]:
>
> ​#################################################################
>
>
> 2017-09-12 17:12:13,839 INFO sqlalchemy.engine.base.Engine SELECT 
>  SERVERPROPERTY('ProductVersion')
> 2017-09-12 17:12:13,840 INFO sqlalchemy.engine.base.Engine ()
> 2017-09-12 17:12:13,881 INFO sqlalchemy.engine.base.Engine SELECT 
> schema_name()
> 2017-09-12 17:12:13,882 INFO sqlalchemy.engine.base.Engine ()
> 2017-09-12 17:12:14,195 INFO sqlalchemy.engine.base.Engine SELECT 
> CAST('test plain returns' AS VARCHAR(60)) AS anon_1
> 2017-09-12 17:12:14,196 INFO sqlalchemy.engine.base.Engine ()
> 2017-09-12 17:12:14,238 INFO sqlalchemy.engine.base.Engine SELECT 
> CAST('test unicode returns' AS NVARCHAR(60)) AS anon_1
> 2017-09-12 17:12:14,239 INFO sqlalchemy.engine.base.Engine ()
> ---------------------------------------------------------------------------
> Empty                                     Traceback (most recent call last)
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1121             wait = use_overflow and self._overflow >= 
> self._max_overflow
> -> 1122             return self._pool.get(wait, self._timeout)
>    1123         except sqla_queue.Empty:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/queue.py 
> in get(self, block, timeout)
>     144                 if self._empty():
> --> 145                     raise Empty
>     146             elif timeout is None:
>
> Empty: 
>
> During handling of the above exception, another exception occurred:
>
> ProgrammingError                          Traceback (most recent call last)
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in _wrap_pool_connect(self, fn, connection)
>    2146         try:
> -> 2147             return fn()
>    2148         except dialect.dbapi.Error as e:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> connect(self)
>     386         if not self._use_threadlocal:
> --> 387             return _ConnectionFairy._checkout(self)
>     388 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _checkout(cls, pool, threadconns, fairy)
>     765         if not fairy:
> --> 766             fairy = _ConnectionRecord.checkout(pool)
>     767 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> checkout(cls, pool)
>     515     def checkout(cls, pool):
> --> 516         rec = pool._do_get()
>     517         try:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1137                     with util.safe_reraise():
> -> 1138                         self._dec_overflow()
>    1139             else:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py
>  
> in __exit__(self, type_, value, traceback)
>      65             if not self.warn_only:
> ---> 66                 compat.reraise(exc_type, exc_value, exc_tb)
>      67         else:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/compat.py 
> in reraise(tp, value, tb, cause)
>     186             raise value.with_traceback(tb)
> --> 187         raise value
>     188 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1134                 try:
> -> 1135                     return self._create_connection()
>    1136                 except:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _create_connection(self)
>     332 
> --> 333         return _ConnectionRecord(self)
>     334 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> __init__(self, pool, connect)
>     460         if connect:
> --> 461             self.__connect(first_connect_check=True)
>     462         self.finalize_callback = deque()
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> __connect(self, first_connect_check)
>     660                     for_modify(pool.dispatch).\
> --> 661                     exec_once(self.connection, self)
>     662             if pool.dispatch.connect:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/event/attr.py 
> in exec_once(self, *args, **kw)
>     245                     try:
> --> 246                         self(*args, **kw)
>     247                     finally:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/event/attr.py 
> in __call__(self, *args, **kw)
>     255         for fn in self.listeners:
> --> 256             fn(*args, **kw)
>     257 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py
>  
> in go(*arg, **kw)
>    1330             once_fn = once.pop()
> -> 1331             return once_fn(*arg, **kw)
>    1332 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py
>  
> in first_connect(dbapi_connection, connection_record)
>     180                 c._execution_options = util.immutabledict()
> --> 181                 dialect.initialize(c)
>     182             event.listen(pool, 'first_connect', first_connect, 
> once=True)
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/connectors/pyodbc.py
>  
> in initialize(self, connection)
>     164         # run other initialization which asks for user name, etc.
> --> 165         super(PyODBCConnector, self).initialize(connection)
>     166 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/dialects/mssql/base.py
>  
> in initialize(self, connection)
>    1741     def initialize(self, connection):
> -> 1742         super(MSDialect, self).initialize(connection)
>    1743         self._setup_version_attributes()
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/default.py
>  
> in initialize(self, connection)
>     265 
> --> 266         self.do_rollback(connection.connection)
>     267 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/default.py
>  
> in do_rollback(self, dbapi_connection)
>     439     def do_rollback(self, dbapi_connection):
> --> 440         dbapi_connection.rollback()
>     441 
>
> ProgrammingError: ('42000', '[42000] [Microsoft][ODBC Driver 13 for SQL 
> Server][SQL Server]111214;An attempt to complete a transaction has failed. 
> No corresponding transaction found. (111214) (SQLEndTran)')
>
> The above exception was the direct cause of the following exception:
>
> ProgrammingError                          Traceback (most recent call last)
> <ipython-input-11-f3810ddb1488> in <module>()
>      17 #cnxn = pyodbc.connect(connection_str)
>      18 #engn.connect()
> ---> 19 df.to_sql(tbl_server_out, engn, if_exists='append', index=False)
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/pandas/core/generic.py 
> in to_sql(self, name, con, flavor, schema, if_exists, index, index_label, 
> chunksize, dtype)
>    1343         sql.to_sql(self, name, con, flavor=flavor, schema=schema,
>    1344                    if_exists=if_exists, index=index, 
> index_label=index_label,
> -> 1345                    chunksize=chunksize, dtype=dtype)
>    1346 
>    1347     def to_pickle(self, path, compression='infer'):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/pandas/io/sql.py in 
> to_sql(frame, name, con, flavor, schema, if_exists, index, index_label, 
> chunksize, dtype)
>     469     pandas_sql.to_sql(frame, name, if_exists=if_exists, 
> index=index,
>     470                       index_label=index_label, schema=schema,
> --> 471                       chunksize=chunksize, dtype=dtype)
>     472 
>     473 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/pandas/io/sql.py in 
> to_sql(self, frame, name, if_exists, index, index_label, schema, chunksize, 
> dtype)
>    1148                          if_exists=if_exists, 
> index_label=index_label,
>    1149                          schema=schema, dtype=dtype)
> -> 1150         table.create()
>    1151         table.insert(chunksize)
>    1152         if (not name.isdigit() and not name.islower()):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/pandas/io/sql.py in 
> create(self)
>     584 
>     585     def create(self):
> --> 586         if self.exists():
>     587             if self.if_exists == 'fail':
>     588                 raise ValueError("Table '%s' already exists." % 
> self.name)
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/pandas/io/sql.py in 
> exists(self)
>     572 
>     573     def exists(self):
> --> 574         return self.pd_sql.has_table(self.name, self.schema)
>     575 
>     576     def sql_schema(self):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/pandas/io/sql.py in 
> has_table(self, name, schema)
>    1176             self.connectable.dialect.has_table,
>    1177             name,
> -> 1178             schema or self.meta.schema,
>    1179         )
>    1180 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in run_callable(self, callable_, *args, **kwargs)
>    2042 
>    2043         """
> -> 2044         with self.contextual_connect() as conn:
>    2045             return conn.run_callable(callable_, *args, **kwargs)
>    2046 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in contextual_connect(self, close_with_result, **kwargs)
>    2110         return self._connection_cls(
>    2111             self,
> -> 2112             self._wrap_pool_connect(self.pool.connect, None),
>    2113             close_with_result=close_with_result,
>    2114             **kwargs)
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in _wrap_pool_connect(self, fn, connection)
>    2149             if connection is None:
>    2150                 Connection._handle_dbapi_exception_noconnection(
> -> 2151                     e, dialect, self)
>    2152             else:
>    2153                 util.reraise(*sys.exc_info())
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in _handle_dbapi_exception_noconnection(cls, e, dialect, engine)
>    1463             util.raise_from_cause(
>    1464                 sqlalchemy_exception,
> -> 1465                 exc_info
>    1466             )
>    1467         else:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/compat.py 
> in raise_from_cause(exception, exc_info)
>     201     exc_type, exc_value, exc_tb = exc_info
>     202     cause = exc_value if exc_value is not exception else None
> --> 203     reraise(type(exception), exception, tb=exc_tb, cause=cause)
>     204 
>     205 if py3k:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/compat.py 
> in reraise(tp, value, tb, cause)
>     184             value.__cause__ = cause
>     185         if value.__traceback__ is not tb:
> --> 186             raise value.with_traceback(tb)
>     187         raise value
>     188 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py 
> in _wrap_pool_connect(self, fn, connection)
>    2145         dialect = self.dialect
>    2146         try:
> -> 2147             return fn()
>    2148         except dialect.dbapi.Error as e:
>    2149             if connection is None:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> connect(self)
>     385         """
>     386         if not self._use_threadlocal:
> --> 387             return _ConnectionFairy._checkout(self)
>     388 
>     389         try:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _checkout(cls, pool, threadconns, fairy)
>     764     def _checkout(cls, pool, threadconns=None, fairy=None):
>     765         if not fairy:
> --> 766             fairy = _ConnectionRecord.checkout(pool)
>     767 
>     768             fairy._pool = pool
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> checkout(cls, pool)
>     514     @classmethod
>     515     def checkout(cls, pool):
> --> 516         rec = pool._do_get()
>     517         try:
>     518             dbapi_connection = rec.get_connection()
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1136                 except:
>    1137                     with util.safe_reraise():
> -> 1138                         self._dec_overflow()
>    1139             else:
>    1140                 return self._do_get()
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py
>  
> in __exit__(self, type_, value, traceback)
>      64             self._exc_info = None   # remove potential circular 
> references
>      65             if not self.warn_only:
> ---> 66                 compat.reraise(exc_type, exc_value, exc_tb)
>      67         else:
>      68             if not compat.py3k and self._exc_info and 
> self._exc_info[1]:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/compat.py 
> in reraise(tp, value, tb, cause)
>     185         if value.__traceback__ is not tb:
>     186             raise value.with_traceback(tb)
> --> 187         raise value
>     188 
>     189 else:
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _do_get(self)
>    1133             if self._inc_overflow():
>    1134                 try:
> -> 1135                     return self._create_connection()
>    1136                 except:
>    1137                     with util.safe_reraise():
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> _create_connection(self)
>     331         """Called by subclasses to create a new 
> ConnectionRecord."""
>     332 
> --> 333         return _ConnectionRecord(self)
>     334 
>     335     def _invalidate(self, connection, exception=None):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> __init__(self, pool, connect)
>     459         self.__pool = pool
>     460         if connect:
> --> 461             self.__connect(first_connect_check=True)
>     462         self.finalize_callback = deque()
>     463 
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/pool.py in 
> __connect(self, first_connect_check)
>     659                 pool.dispatch.first_connect.\
>     660                     for_modify(pool.dispatch).\
> --> 661                     exec_once(self.connection, self)
>     662             if pool.dispatch.connect:
>     663                 pool.dispatch.connect(self.connection, self)
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/event/attr.py 
> in exec_once(self, *args, **kw)
>     244                 if not self._exec_once:
>     245                     try:
> --> 246                         self(*args, **kw)
>     247                     finally:
>     248                         self._exec_once = True
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/event/attr.py 
> in __call__(self, *args, **kw)
>     254             fn(*args, **kw)
>     255         for fn in self.listeners:
> --> 256             fn(*args, **kw)
>     257 
>     258     def __len__(self):
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py
>  
> in go(*arg, **kw)
>    1329         if once:
>    1330             once_fn = once.pop()
> -> 1331             return once_fn(*arg, **kw)
>    1332 
>    1333     return go
>
> /home/saravji/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py
>  
> in first_connect(dbapi_connection, connection_record)
>     179                      
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to