Skip to content

"unknown encoding" crash without encoding listed for complex query #595

Description

@rgoodman-qontigo
  1. What versions are you using?
>>> print(conn.version)
19.21.0.0.0
  1. Is it an error or a hang or a crash?

Crash

  1. What error(s) or behavior you are seeing?
>>> cursor.fetchall()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rogo_a/work/Cassandra-RiskModelTesting/SignalsOutlierDetection/venv_outlier/lib/python3.12/site-packages/oracledb/cursor.py", line 968, in fetchall
    row = fetch_next_row(self)
          ^^^^^^^^^^^^^^^^^^^^
  File "src/oracledb/impl/base/cursor.pyx", line 576, in oracledb.base_impl.BaseCursorImpl.fetch_next_row
  File "src/oracledb/impl/thin/cursor.pyx", line 268, in oracledb.thin_impl.ThinCursorImpl._fetch_rows
  File "src/oracledb/impl/thin/protocol.pyx", line 501, in oracledb.thin_impl.Protocol._process_single_message
  File "src/oracledb/impl/thin/protocol.pyx", line 502, in oracledb.thin_impl.Protocol._process_single_message
  File "src/oracledb/impl/thin/protocol.pyx", line 470, in oracledb.thin_impl.Protocol._process_message
  File "src/oracledb/impl/thin/protocol.pyx", line 446, in oracledb.thin_impl.Protocol._process_message
  File "src/oracledb/impl/thin/messages/base.pyx", line 790, in oracledb.thin_impl.Message.process
  File "src/oracledb/impl/thin/messages/base.pyx", line 1263, in oracledb.thin_impl.MessageWithData._process_message
  File "src/oracledb/impl/thin/messages/base.pyx", line 1349, in oracledb.thin_impl.MessageWithData._process_row_data
  File "src/oracledb/impl/thin/messages/base.pyx", line 1112, in oracledb.thin_impl.MessageWithData._process_column_data
  File "src/oracledb/impl/base/converters.pyx", line 540, in oracledb.base_impl.convert_oracle_data_to_python
  File "src/oracledb/impl/base/converters.pyx", line 429, in oracledb.base_impl.convert_str_to_python
LookupError: unknown encoding:
  1. Does your application call init_oracle_client()?

No

  1. Include a runnable Python script that shows the problem.

This is very difficult as it is a complex query and uses temporary tables as well as proprietary schema and data. However I have narrowed it down to one set of records. If you can clue me into what I could look for in the database that might cause this crash, perhaps I can correct our data as a workaround.

Additional information :

SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';

VALUE
--------------------------------------------------------------------------------
AL32UTF8

SQL> select value from nls_database_parameters where parameter='NLS_NCHAR_CHARACTERSET';

VALUE
--------------------------------------------------------------------------------
AL16UTF16

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions