Hello,
I'm trying to understand where the code fails, but so far without any progress. Is there a way to enable some kind of logging to see the offending data?
latest and greatest cx_oracle with python 3.5
I'm on TimesTen. Table has a timestamp column.
I noticed that if i call setinputsize() the insert fails. At the same time data can contain milliseconds. And in other functions i do insert data with milisecs. In this particular case all dates are truncated to seconds.
dt = datetime.strptime(date, '%Y%m%d %H:%M:%S')
histReq.data.append([reqId, 4, close, dt])
where reqid and close are int
and histReQ.data = []
def flushTicks(self, data: list):
try:
cursor = self.connection.cursor()
# cursor.setinputsizes(ts=cx_Oracle.TIMESTAMP)
cursor.executemany("insert into ticks(reqid, tick_type_id,tick_value, ts) values( :ti, :tt, :tp, :ts ) ",
data)
self.connection.commit()
cursor.close()
except cx_Oracle.DatabaseError as exc:
blah blah
I printed the data in hopes to see the offending record... But nothing catches my eye.
historicalData dt - 2017-10-03 23:45:00
historicalData dt - 2017-10-03 23:46:00
historicalData dt - 2017-10-03 23:47:00
historicalData dt - 2017-10-03 23:48:00
historicalData dt - 2017-10-03 23:49:00
historicalData dt - 2017-10-03 23:50:00
historicalData dt - 2017-10-03 23:51:00
historicalData dt - 2017-10-03 23:52:00
historicalData dt - 2017-10-03 23:53:00
historicalData dt - 2017-10-03 23:54:00
historicalData dt - 2017-10-03 23:55:00
historicalData dt - 2017-10-03 23:56:00
historicalData dt - 2017-10-03 23:57:00
historicalData dt - 2017-10-03 23:58:00
historicalData dt - 2017-10-03 23:59:00
historicalData dt - 2017-10-04 00:00:00
historicalData dt - 2017-10-04 00:01:00
historicalData dt - 2017-10-04 00:02:00
historicalData dt - 2017-10-04 00:03:00
historicalData dt - 2017-10-04 00:04:00
historicalData dt - 2017-10-04 00:05:00
historicalData dt - 2017-10-04 00:06:00
historicalData dt - 2017-10-04 00:07:00
historicalData dt - 2017-10-04 00:08:00
historicalData dt - 2017-10-04 00:09:00
historicalData dt - 2017-10-04 00:10:00
historicalData dt - 2017-10-04 00:11:00
historicalData dt - 2017-10-04 00:12:00
historicalData dt - 2017-10-04 00:13:00
historicalData dt - 2017-10-04 00:14:00
historicalData dt - 2017-10-04 00:15:00
historicalData dt - 2017-10-04 00:16:00
historicalData dt - 2017-10-04 00:17:00
historicalData dt - 2017-10-04 00:18:00
historicalData dt - 2017-10-04 00:19:00
historicalData dt - 2017-10-04 00:20:00
historicalData dt - 2017-10-04 00:21:00
historicalData dt - 2017-10-04 00:22:00
historicalData dt - 2017-10-04 00:23:00
historicalData dt - 2017-10-04 00:24:00
historicalData dt - 2017-10-04 00:25:00
historicalData dt - 2017-10-04 00:26:00
historicalData dt - 2017-10-04 00:27:00
historicalData dt - 2017-10-04 00:28:00
histReqAsync Returning data for future reqid - 2
ERROR: Unable to insert values.
Oracle-Error-Code: 932
Oracle-Error-Message: ORA-00932: Datetime field overflow
Appreciate your help.