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

Error saving series with all missing values #280

Open
greg-wiltshire opened this issue Jan 20, 2023 · 0 comments
Open

Error saving series with all missing values #280

greg-wiltshire opened this issue Jan 20, 2023 · 0 comments

Comments

@greg-wiltshire
Copy link
Contributor

Bug Report

Steps to Reproduce:

In an IDE using the tracdap runtime try to save a dataFrame as an output of a model:

Create the dataFrame with a column made up completely of missing values:

data = {
    'INDEX': ['A', 'B', 'C'],
    'INDEX_VALUE_DATE': [date, date, date],
    'INDEX_VALUE': [pd.NA, pd.NA, pd.NA]
}

df = pd.DataFrame(data)

With the schema:

field_name,field_type,label,categorical,business_key,format_code
INDEX,STRING,Index name,FALSE,FALSE
INDEX_VALUE_DATE,DATE,Index value date,FALSE,FALSE,"DAY"
INDEX_VALUE,FLOAT,Index value,FALSE,FALSE,"|.|3|||1"

Expected Result:

Data is saved as an output without error.

Actual Result:

Error occurs

    raise _ex.EModelExec(msg) from e
tracdap.rt.exceptions.EModelExec: There was an unhandled error in the model: Column 2 named INDEX_VALUE expected length 3 but got length 0

Environment:

Python 3.11
tracdap runtime 0.5.9

Additional Context:

Saving the data works if one value in the column is not NA.

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

No branches or pull requests

1 participant