-
Notifications
You must be signed in to change notification settings - Fork 361
Description
Answer the following questions:
-
What is your version of Python? Is it 32-bit or 64-bit? Python 3.6.3 (64-bit)
-
What is your cx_Oracle version? 7.1.1
-
What exact command caused the problem (e.g. what command did you try to install with)? Who were you logged in as? N.A.
-
What error(s) you are seeing? SEGFAULT
-
What OS (and version) is Python executing on? Oracle Linux Server 7.6 (under systemd-nspawn on Ubuntu 18.04.2 LTS)
-
What is your version of the Oracle client (e.g. Instant Client)? How was it installed? Where is it installed?
SQL*Plus: Release 18.0.0.0.0 - Production on Mon Mar 4 12:48:41 2019
Version 18.4.0.0.0
Installed from repositories -
What is your Oracle Database version?
Oracle XE 18c installed from the OTN RPM -
What is the
PATHenvironment variable (on Windows) orLD_LIBRARY_PATH(on Linux) set to? On macOS, what is in~/lib?
LD_LIBRARY_PATH="/lib64:/opt/oracle/product/18c/dbhomeXE/lib"
No ~/lib folder -
What Oracle environment variables did you set? How exactly did you set them?
ORACLE_SID=XE
ORACLE_BASE=/opt/oracle
ORAENV_ASK=NO
ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE -
Do you have a small, single Python script that immediately runs to show us the problem?
import cx_Oracle
# import threading # Uncomment this to "fix" SEGFAULT
def callback(msg):
print(msg)
db = cx_Oracle.Connection("g", "g", "XE", events=True)
cursor = db.cursor()
try:
cursor.execute("drop table temp_sub")
except cx_Oracle.DatabaseError:
pass
cursor = db.cursor()
cursor.execute("create table temp_sub(id number(3))")
sub = db.subscribe(callback=callback, ipAddress="127.0.0.1")
sub.registerquery("select * from temp_sub")
cursor.executemany(
"insert into temp_sub values (:1)",
[(i,) for i in range(10)]
)
cursor.execute("drop table temp_sub")
db.close()