A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/oracle/python-oracledb/issues/486 below:

Fetching DF segfaults when outputtypehandler is present · Issue #486 · oracle/python-oracledb · GitHub

Skip to content Navigation Menu

Saved searches Use saved searches to filter your results more quickly

Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Additional navigation options

Fetching DF segfaults when outputtypehandler is present #486

Description
  1. What versions are you using?
    3.1.0, repro in python 3.9 and 3.12, issue is on client side I think, DB version is irrelevant

  2. Is it an error or a hang or a crash?
    Hard crash, segfault

  3. What error(s) or behavior you are seeing?
    Segmentation fault

  4. Does your application call init_oracle_client()?
    Reproduces both in thin and thick mode

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

import oracledb

# this is copy&paste from doc                                                                                                                                                                                                                                                                                                                                                                
def output_type_handler(cursor, metadata):
    def out_converter(d):
        if isinstance(d, str):
            return f"{d} was a string"
        else:
            return f"{d} was not a string"

    if metadata.type_code is oracledb.DB_TYPE_NUMBER:
        return cursor.var(
            oracledb.DB_TYPE_VARCHAR,
            arraysize=cursor.arraysize,
            outconverter=out_converter,
        )


conn = oracledb.connect("...")
# comment out the line below and the issue goes away
conn.outputtypehandler = output_type_handler
sql = "select 1 n from dual"
t = conn.fetch_df_all(sql)
print(t)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4