Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: could not extract source code #48

Closed
exa-eswar opened this issue Nov 24, 2023 · 2 comments · Fixed by #49
Closed

OSError: could not extract source code #48

exa-eswar opened this issue Nov 24, 2023 · 2 comments · Fixed by #49
Assignees
Labels
bug Unwanted / harmful behavior

Comments

@exa-eswar
Copy link

if we run the following example in Jupyter notebook or Ipython in general, I am getting OSError: could not extract source code



from exasol_udf_mock_python.udf_mock_executor import UDFMockExecutor
from exasol_udf_mock_python.mock_meta_data import MockMetaData
from exasol_udf_mock_python.column import Column

def udf_wrapper():

    def run(ctx):
        return ctx.t1+1, ctx.t2+1.1, ctx.t3+"1"

executor = UDFMockExecutor()
meta = MockMetaData(
    script_code_wrapper_function=udf_wrapper,
    input_type="SCALAR",
    input_columns=[Column("t1", int, "INTEGER"),
                   Column("t2", float, "FLOAT"),
                   Column("t3", str, "VARCHAR(20000)")],
    output_type="RETURNS",
    output_columns=[Column("t1", int, "INTEGER"),
                    Column("t2", float, "FLOAT"),
                    Column("t3", str, "VARCHAR(20000)")]
)
exa = MockExaEnvironment(meta)
result = executor.run([Group([(1,1.0,"1"), (5,5.0,"5"), (6,6.0,"6")])], exa)

result
@tkilias
Copy link
Collaborator

tkilias commented Nov 24, 2023

For potential fix, look here uqfoundation/dill#346 (comment)

@tkilias tkilias added the bug Unwanted / harmful behavior label Feb 22, 2024
@ahsimb ahsimb self-assigned this Mar 13, 2024
@ahsimb
Copy link
Contributor

ahsimb commented Mar 13, 2024

I can't reproduce it with Python 3.8.10 and Jupyter Notebook 7.0.4

I assume the following imports were just missed in the problem description.

from exasol_udf_mock_python.mock_exa_environment import MockExaEnvironment
from exasol_udf_mock_python.group import Group

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unwanted / harmful behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants