pandas - Thrift error in Python -> Hive connection -


i using package pyhive create sqlalchemy engine connect pandas , hive. reason, today started getting keyerror particular type_code (17) after server work on reset. have ever installed thrift via pip, , don't have idea of how works. understand, thrift autogenerate sort of python file (tcliservice?) cannot directly import, , pyhive code runs off of that. there way regenerate file fix problem, or have experience similar problem? here full stack trace:

----> 1 pd.read_sql_query("select * table", engine)  /anaconda/lib/python2.7/site-packages/pandas/io/sql.pyc in read_sql_query(sql, con, index_col, coerce_float, params, parse_dates, chunksize)     399     return pandas_sql.read_query(     400         sql, index_col=index_col, params=params, coerce_float=coerce_float, --> 401         parse_dates=parse_dates, chunksize=chunksize)     402     403  /anaconda/lib/python2.7/site-packages/pandas/io/sql.pyc in read_query(self, sql, index_col, coerce_float, parse_dates, params, chunksize)    1082         args = _convert_params(sql, params)    1083 -> 1084         result = self.execute(*args)    1085         columns = result.keys()    1086  /anaconda/lib/python2.7/site-packages/pandas/io/sql.pyc in execute(self, *args, **kwargs)     976     def execute(self, *args, **kwargs):     977         """simple passthrough sqlalchemy engine""" --> 978         return self.engine.execute(*args, **kwargs)     979     980     def read_table(self, table_name, index_col=none, coerce_float=true,  /anaconda/lib/python2.7/site-packages/sqlalchemy/engine/base.pyc in execute(self, statement, *multiparams, **params)    1749    1750         connection = self.contextual_connect(close_with_result=true) -> 1751         return connection.execute(statement, *multiparams, **params)    1752    1753     def scalar(self, statement, *multiparams, **params):  /anaconda/lib/python2.7/site-packages/sqlalchemy/engine/base.pyc in execute(self, object, *multiparams, **params)     719         """     720         if isinstance(object, util.string_types[0]): --> 721             return self._execute_text(object, multiparams, params)     722         try:     723             meth = object._execute_on_connection  /anaconda/lib/python2.7/site-packages/sqlalchemy/engine/base.pyc in _execute_text(self, statement, multiparams, params)     868             statement,     869             parameters, --> 870             statement, parameters     871         )     872         if self._has_events or self.engine._has_events:  /anaconda/lib/python2.7/site-packages/sqlalchemy/engine/base.pyc in _execute_context(self, dialect, constructor, statement, parameters, *args)     973         # create resultproxy, rowcount/implicit returning     974         # rows, close cursor if no further results pending --> 975         result = context.get_result_proxy()     976         if context.isinsert:     977             if context._is_implicit_returning:  /anaconda/lib/python2.7/site-packages/sqlalchemy/engine/default.pyc in get_result_proxy(self)     767     768     def get_result_proxy(self): --> 769         return result.resultproxy(self)     770     771     @property  /anaconda/lib/python2.7/site-packages/sqlalchemy/engine/result.pyc in __init__(self, context)     401         self._echo = self.connection._echo , \     402             context.engine._should_log_debug() --> 403         self._init_metadata()     404     405     def _init_metadata(self):  /anaconda/lib/python2.7/site-packages/sqlalchemy/engine/result.pyc in _init_metadata(self)     404     405     def _init_metadata(self): --> 406         metadata = self._cursor_description()     407         if metadata not none:     408             self._metadata = resultmetadata(self, metadata)  /anaconda/lib/python2.7/site-packages/sqlalchemy/engine/result.pyc in _cursor_description(self)     514         """may overridden subclasses."""     515 --> 516         return self._saved_cursor.description     517     518     def close(self, _autoclose_connection=true):  /anaconda/lib/python2.7/site-packages/pyhive/hive.pyc in description(self)     211                 else:     212                     type_id = primary_type_entry.primitiveentry.type --> 213                     type_code = ttypes.ttypeid._values_to_names[type_id]     214                 self._description.append((     215                     col.columnname.decode('utf-8'), type_code.decode('utf-8'), 

keyerror: 17


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -