[log in to unmask]" type="cite">Hi Daniel,
This is a follow-up on my earlier note about trouble accessing Qserv with JDBC. I tried a python module as well. (Results are not in the logs I sent you, but I can send them if it's helpful.)
~> pip list | grep mysqlmysql-connector-python (2.0.2)
It worked when I tried to connect to a standard MySQL db, but not when I tried to connect to qserv. Immediately following the failure, I cut and pasted the qserv connection values I had used into a mysql command in the same terminal session. That connect to the LSST db. Below is the output from the Python connection attempt.
BTW: is there a preferred Python module to use with qserv? I have a few, but tried only one tonight—the one from the MySQL site. One more question, has anyone tried to fill a Pandas data frame directly from a qserv query?
My ipython session:
In [1]: import mysql.connector
In [2]: cnx = mysql.connector.connect(user='qsmaster', host='lsst-db1.ipac.caltech.edu', database='LSST', port=4040)
---------------------------------------------------------------------------InternalError Traceback (most recent call last)<ipython-input-2-15e0754e8f3a> in <module>()----> 1 cnx = mysql.connector.connect(user='qsmaster', host='lsst-db1.ipac.caltech.edu', database='LSST', port=4040)
/Users/johnrector/anaconda/lib/python2.7/site-packages/mysql/connector/__init__.pyc in connect(*args, **kwargs)157158 # Regular connection--> 159 return MySQLConnection(*args, **kwargs)160 Connect = connect # pylint: disable=C0103161
/Users/johnrector/anaconda/lib/python2.7/site-packages/mysql/connector/connection.pyc in __init__(self, *args, **kwargs)127128 if len(kwargs) > 0:--> 129 self.connect(**kwargs)130131 def _get_self(self):
/Users/johnrector/anaconda/lib/python2.7/site-packages/mysql/connector/connection.pyc in connect(self, **kwargs)453 self.disconnect()454 self._open_connection()--> 455 self._post_connection()456457 def shutdown(self):
/Users/johnrector/anaconda/lib/python2.7/site-packages/mysql/connector/connection.pyc in _post_connection(self)433 """434 self.set_charset_collation(self._charset_id)--> 435 self.autocommit = self._autocommit436 if self._time_zone:437 self.time_zone = self._time_zone
/Users/johnrector/anaconda/lib/python2.7/site-packages/mysql/connector/connection.pyc in set_autocommit(self, value)1289 """Toggle autocommit"""1290 switch = 'ON' if value else 'OFF'-> 1291 self._execute_query("SET @@session.autocommit = {0}".format(switch))1292 self._autocommit = value1293
/Users/johnrector/anaconda/lib/python2.7/site-packages/mysql/connector/connection.pyc in _execute_query(self, query)1495 """1496 if self._unread_result is True:-> 1497 raise errors.InternalError("Unread result found.")14981499 self.cmd_query(query)
InternalError: Unread result found.
______________________________John RectorIPAC, California Institute of TechnologyMS 100-22770 S. Wilson Ave.Pasadena, CA 91125USATel: (626) 395—8577
Use REPLY-ALL to reply to list
To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1