I've caught a problem I can't explain using pygresql for python. This is a simple SELECT query and as far as I can tell the only query that has the problem in the whole script.
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "run_daily_script.py", line 122, in DelegateAPINodes
vm_api_group = Execute(db_conn, fetch_api_group, (cust_id, nodes["node_id"]))
File ".../PreparedQueries.py", line 14, in Execute
result = db.execute(command)
File "/usr/local/lib/python2.7/site-packages/pgdb.py", line 1030, in execute
return self.executemany(operation, [parameters])
File "/usr/local/lib/python2.7/site-packages/pgdb.py", line 1065, in executemany
raise _op_error("Internal error in '%s': %s" % (sql, err))
OperationalError: Internal error in 'SELECT * FROM vm_api_group WHERE cust_id=3 AND node_id=18': insufficient data in "T" message
I ran the query via the console and it works just fine. I monitored psql logs and there were no errors from the database. It seems to be an internal operation with pygresql.
What does "T" mean and how do I fix this?