-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
- What versions are you using?
platform.platform: Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-glibc2.29
sys.maxsize > 2**32: True
platform.python_version: 3.8.10
oracledb.version: 1.0.3
- Is it an error or a hang or a crash?
There is a message in console reading "Exception ignored".
- What error(s) or behavior you are seeing?
...
...
Exception ignored in: <function Connection.__del__ at 0x7f5a0eb16280>
Traceback (most recent call last):
File "/home/toby/projects/mai/.venv/lib/python3.8/site-packages/oracledb/connection.py", line 144, in __del__
File "src/oracledb/impl/thin/connection.pyx", line 283, in oracledb.thin_impl.ThinConnImpl.close
AttributeError: 'NoneType' object has no attribute 'SSLError'- Does your application call init_oracle_client()?
No, running Thin mode.
- Include a runnable Python script that shows the problem.
I'm running other's code and there is a little wrapper class as follows. I run a Flask app that connects to Oracle DB, and the message always shows when I do Ctrl+C to stop the process. I see this message occasionally otherwise, but not sure about the root cause.
import oracledb as cx_Oracle
class OracleDB(object):
def __init__(self, connection_str):
self.con = cx_Oracle.connect(
self.connection_str, encoding="UTF-8", nencoding="UTF-8", threaded=True
)
self.cursor = None
self.cursor2 = None
# some other methods here...
def close(self):
logger.info("closing db connection...")
try:
self.cursor.close()
del self.cursor
except:
pass
try:
self.cursor2.close()
del self.cursor2
except:
pass
try:
self.con.close()
del self.con
except:
passMetadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested