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

Series length 1 doesn't match DataFrame height 3 in select() #18896

Closed
2 tasks done
douglas-raillard-arm opened this issue Sep 24, 2024 · 32 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working python Related to Python Polars

Comments

@douglas-raillard-arm
Copy link
Contributor

douglas-raillard-arm commented Sep 24, 2024

Re-opening #18719 as it is still failing in v1.8.1

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

Same reproducer as on #18719 but re-ran with 1.8.1:

import io

import polars as pl

plan = r'''{"IR":{"version":1623,"dsl":{"MapFunction":{"input":{"HStack":{"input":{"IR":{"version":1546,"dsl":{"HStack":{"input":{"MapFunction":{"input":{"Select":{"expr":[{"Column":"__timestamp"},{"Function":{"input":[{"Function":{"input":[{"Column":"line"},{"Literal":"Null"}],"function":{"StringExpr":"StripChars"},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"function":{"StringExpr":{"ExtractGroups":{"dtype":{"Struct":[{"name":"data","dtype":"String"},{"name":"event","dtype":"String"}]},"pat":"(?:[\\w@]+):? *(?:data=(?P<data>.+?)(?: +|$)|event=(?P<event>.+?)(?: +|$)|\\w+=\\S+?(?: +|$))+"}}},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"input":{"Filter":{"input":{"MapFunction":{"input":{"Select":{"expr":[{"Column":"__event"},{"Column":"__fields"},{"Column":"__timestamp"},{"Column":"line"}],"input":{"IR":{"version":1464,"dsl":{"HStack":{"input":{"Select":{"expr":[{"Column":"__timestamp"},{"Column":"__event"},{"Column":"__fields"},{"Column":"line"}],"input":{"HStack":{"input":{"DataFrameScan":{"df":{"columns":[{"name":"__event","datatype":"Binary","bit_settings":"","values":[[114,116,97,112,112,95,109,97,105,110],[114,116,97,112,112,95,109,97,105,110],[114,116,97,112,112,95,109,97,105,110]]},{"name":"__fields","datatype":"Binary","bit_settings":"","values":[[101,118,101,110,116,61,115,116,97,114,116],[101,118,101,110,116,61,99,108,111,99,107,95,114,101,102,32,100,97,116,97,61,52,55,49,51,50,52,56,54,48],[101,118,101,110,116,61,101,110,100]]},{"name":"__timestamp","datatype":"Int64","bit_settings":"","values":[471410977940,471412970020,472920141960]},{"name":"line","datatype":"Binary","bit_settings":"","values":[[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,115,116,97,114,116,10],[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,99,108,111,99,107,95,114,101,102,32,100,97,116,97,61,52,55,49,51,50,52,56,54,48,10],[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,101,110,100,10]]}]},"schema":{"fields":{"__event":"Binary","__fields":"Binary","__timestamp":"Int64","line":"Binary"}}}},"exprs":[{"Cast":{"expr":{"DtypeColumn":["Binary"]},"dtype":"String","options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"exprs":[{"Cast":{"expr":{"Column":"__event"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Drop":{"to_drop":[{"Root":{"Column":"__fields"}}],"strict":false}}}},"predicate":{"BinaryExpr":{"left":{"Column":"__event"},"op":"Eq","right":{"Literal":{"String":"rtapp_main"}}}}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Unnest":[{"Root":{"Column":"line"}}]}}},"exprs":[{"Function":{"input":[{"DtypeColumn":["String"]},{"Literal":"Null"}],"function":{"StringExpr":"StripChars"},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}}}},"exprs":[{"Cast":{"expr":{"Column":"__timestamp"},"dtype":"Int64","options":"Strict"}},{"Cast":{"expr":{"Column":"data"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}},{"Cast":{"expr":{"Column":"event"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Rename":{"existing":["__timestamp"],"new":["Time"]}}}}}}'''
plan = io.StringIO(plan)
df = pl.LazyFrame.deserialize(plan, format='json')
print(df.explain(optimized=True))
print(df.collect())

Log output

File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/checkouts/test-rtd/lisa/trace.py", line 1940, in parse_event
    df = df.collect()
         ^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/lazyframe/frame.py", line 2033, in collect
    return wrap_df(ldf.collect(callback))
                   ^^^^^^^^^^^^^^^^^^^^^
polars.exceptions.InvalidOperationError: Series: line, length 1 doesn't match the DataFrame height of 3

If you want this Series to be broadcasted, ensure it is a scalar (for instance by adding '.first()').

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/lazyframe/frame.py", line 2033, in collect
    return wrap_df(ldf.collect(callback))
                   ^^^^^^^^^^^^^^^^^^^^^
polars.exceptions.InvalidOperationError: Series: line, length 1 doesn't match the DataFrame height of 3

Issue description

Collecting that LazyFrame triggers an exception in readthedocs CI but not locally, even after re-creating the same environment (pip freeze). The only material difference I can think of is some StringCache() state that is difference for whatever reason.

Note that this issue only started occuring from polars 1.7.0. Before that, the code was working.

Also note that the JSON plan is only there to make reproduction of the issue easier (both for me to extract the data from the CI log and for that bug report). The issue originally happened without that JSON layer (at least not at this spot). I also ended up trying the reported reproducer verbatim both in the CI and locally, with the same result (fails in the CI, succeeds locally).

Expected behavior

This should work or not work, but consistently everywhere. Most likely work.

Installed versions

Polars upgraded to 1.8.1 compared to initial report.

@douglas-raillard-arm douglas-raillard-arm added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Sep 24, 2024
@ritchie46
Copy link
Member

Can you show the query? You might need to add first().

@douglas-raillard-arm
Copy link
Contributor Author

douglas-raillard-arm commented Sep 24, 2024

The query is not trivial as it involves multiple functions but the dumped JSON for v1.7.0 is:

import io

import polars as pl

plan = r'''{"IR":{"version":1428,"dsl":{"MapFunction":{"input":{"HStack":{"input":{"IR":{"version":1351,"dsl":{"HStack":{"input":{"MapFunction":{"input":{"Select":{"expr":[{"Column":"__timestamp"},{"Function":{"input":[{"Function":{"input":[{"Column":"line"},{"Literal":"Null"}],"function":{"StringExpr":"StripChars"},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"function":{"StringExpr":{"ExtractGroups":{"dtype":{"Struct":[{"name":"data","dtype":"String"},{"name":"event","dtype":"String"}]},"pat":"(?:[\\w@]+):? *(?:data=(?P<data>.+?)(?: +|$)|event=(?P<event>.+?)(?: +|$)|\\w+=\\S+?(?: +|$))+"}}},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"input":{"Filter":{"input":{"MapFunction":{"input":{"Select":{"expr":[{"Column":"__event"},{"Column":"__fields"},{"Column":"__timestamp"},{"Column":"line"}],"input":{"IR":{"version":1269,"dsl":{"HStack":{"input":{"Select":{"expr":[{"Column":"__timestamp"},{"Column":"__event"},{"Column":"__fields"},{"Column":"line"}],"input":{"HStack":{"input":{"DataFrameScan":{"df":{"columns":[{"name":"__event","datatype":"Binary","bit_settings":"","values":[[114,116,97,112,112,95,109,97,105,110],[114,116,97,112,112,95,109,97,105,110],[114,116,97,112,112,95,109,97,105,110]]},{"name":"__fields","datatype":"Binary","bit_settings":"","values":[[101,118,101,110,116,61,115,116,97,114,116],[101,118,101,110,116,61,99,108,111,99,107,95,114,101,102,32,100,97,116,97,61,52,55,49,51,50,52,56,54,48],[101,118,101,110,116,61,101,110,100]]},{"name":"__timestamp","datatype":"Int64","bit_settings":"","values":[471410977940,471412970020,472920141960]},{"name":"line","datatype":"Binary","bit_settings":"","values":[[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,115,116,97,114,116,10],[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,99,108,111,99,107,95,114,101,102,32,100,97,116,97,61,52,55,49,51,50,52,56,54,48,10],[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,101,110,100,10]]}]},"schema":{"fields":{"__event":"Binary","__fields":"Binary","__timestamp":"Int64","line":"Binary"}},"output_schema":null,"filter":null}},"exprs":[{"Cast":{"expr":{"DtypeColumn":["Binary"]},"dtype":"String","options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"exprs":[{"Cast":{"expr":{"Column":"__event"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Drop":{"to_drop":[{"Root":{"Column":"__fields"}}],"strict":false}}}},"predicate":{"BinaryExpr":{"left":{"Column":"__event"},"op":"Eq","right":{"Literal":{"String":"rtapp_main"}}}}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Unnest":[{"Root":{"Column":"line"}}]}}},"exprs":[{"Function":{"input":[{"DtypeColumn":["String"]},{"Literal":"Null"}],"function":{"StringExpr":"StripChars"},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}}}},"exprs":[{"Cast":{"expr":{"Column":"__timestamp"},"dtype":"Int64","options":"Strict"}},{"Cast":{"expr":{"Column":"data"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}},{"Cast":{"expr":{"Column":"event"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Rename":{"existing":["__timestamp"],"new":["Time"]}}}}}}'''
plan = io.StringIO(plan)
df = pl.LazyFrame.deserialize(plan, format='json')
print(df)
print(df.collect())

The code leading to this lazyframe is either:

EDIT: the LazyFrame pretty printed is:

RENAME
   WITH_COLUMNS:
   [col("data").strict_cast(Categorical(None, Physical)), col("event").strict_cast(Categorical(None, Physical))] 
     WITH_COLUMNS:
     [col("data").str.strip_chars([null]), col("event").str.strip_chars([null]), col("__timestamp").strict_cast(Int64)] 
      UNNEST by:[line]
         SELECT [col("__timestamp"), col("line").str.strip_chars([null]).str.extract_groups()] FROM
          simple π 3/3 ["__event", "__timestamp", ... 1 other column]
            FILTER [(col("__event")) == (String(rtapp_main))] FROM
               WITH_COLUMNS:
               [col("__event").strict_cast(Categorical(None, Physical))] 
                simple π 3/3 ["__timestamp", "__event", ... 1 other column]
                   WITH_COLUMNS:
                   [col("__event").strict_cast(String), col("line").strict_cast(String)] 
                    DF ["__event", "__fields", "__timestamp", "line"]; PROJECT 3/4 COLUMNS; SELECTION: None

EDIT 2: I'm rebuilding to get an up-to-date JSON for v1.8.
EDIT 3: the JSON IR is now refreshed and I updated the issue description to include it, rather than just pointing at the old one in the old issue.

@douglas-raillard-arm
Copy link
Contributor Author

douglas-raillard-arm commented Sep 24, 2024

Part of the problem here is that the error happens very late when collecting, at which point location information is completely lost. Is there a way to make polars validate at every step as some kind of debug mode ?

EDIT: the other part of the problem is that the issue is not reproducible locally, but happens 100% of the time when building our documentation in the readthedocs.org runner.

@ritchie46
Copy link
Member

Can you serialize the result before running? As I cannot reproduce this locally. If I can reproduce I know what it can be. This query plan formatted doesn't seem to have any scalar misuse.

That's where the error comes from. It checks at runtime if the literal is allowed to be broadcasted. This is only allowed if the literal is a scalar.

@douglas-raillard-arm
Copy link
Contributor Author

Can you serialize the result before running?

If you mean serialize to JSON before calling .collect(), this is what is in the reproducer of the current ticket (I updated it 45min ago). What is puzzling is that even with that JSON I also cannot reproduce locally. It only ever happened on readthedocs for whatever reason ...

@ritchie46
Copy link
Member

Could you compile from source with #18904?

That will try to print the expression that is at fault.

@douglas-raillard-arm
Copy link
Contributor Author

I'll give it a go but this will probably take a while. Are the compiled binaries statically linked and fully portable ? I have no idea what libc is used on that runner, and compiling in-situ is impossible because of build timeouts.

@ritchie46
Copy link
Member

Ok, will patch tonight with an option to temporarily silence this error. Note that it will become a hard error in the future, but hopefully with the new better error message we can find the culprit.

@ritchie46
Copy link
Member

ritchie46 commented Sep 24, 2024

You can then silence it by setting POLARS_ALLOW_NON_SCALAR_EXP="1". But first watch the improved error message for the expression. ;)

@douglas-raillard-arm
Copy link
Contributor Author

I tried to build a wheel and commit it to a branch to try it out:

# build the wheel with a reasonable size
maturin build -m py-polars/Cargo.toml --strip

The DSO shipping in the .whl file seems to only depend on glibc, but I haven't tried to check what runs in the CI runner.

>>> ldd target/wheels/polars.abi3.so
        linux-vdso.so.1 (0x00007fffa7195000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000760bfb071000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000760bea000000)
        /lib64/ld-linux-x86-64.so.2 (0x0000760bfb0bb000)

And then it failed to install in the readthedocs runner for some unknown reason:

ERROR: polars-1.8.1-cp38-abi3-manylinux_2_39_x86_64.whl is not a supported wheel on this platform.

@douglas-raillard-arm
Copy link
Contributor Author

douglas-raillard-arm commented Sep 25, 2024

So I just re-ran the job, which installed 1.8.2 and the error stays:

polars.exceptions.InvalidOperationError: Series: line, length 1 doesn't match the DataFrame height of 3
If you want this Series to be broadcasted, ensure it is a scalar (for instance by adding '.first()').

https://readthedocs.org/api/v2/build/25738204.txt

I tried with POLARS_ALLOW_NON_SCALAR_EXP=1 just before collect():

        import os
        os.environ['POLARS_ALLOW_NON_SCALAR_EXP'] = '1'
        df = df.collect()

And still get the same error:
https://readthedocs.org/api/v2/build/25738487.txt

So this makes me wonder if either the error is coming from another place, or v1.8.2 does not have this code in it somehow. Pip does install 1.8.2 and nothing else according to the log.

EDIT: this makes me realize that setting os.environ is probably useless as polars will use the Rust code, which is probably looking at the environment vector (directly or via libc). Modifying os.environ does not modify that, it only lives in the Python interpreted world.

EDIT 2: I used RTD facility to set an env var for the whole runner before any code runs, and still get the same error ...

@ritchie46
Copy link
Member

ritchie46 commented Sep 25, 2024

Can you set POLARS_PANIC_ON_ERR=1 and RUST_BACKTRACE=1? This will give us the full stacktrace. That way we can see where it occurs.

DIT: this makes me realize that setting os.environ is probably useless as polars will use the Rust code, which is probably looking at the environment vector (directly or via libc). Modifying os.environ does not modify that, it only lives in the Python interpreted world.

You must set it before Polars is imported.

@douglas-raillard-arm
Copy link
Contributor Author

douglas-raillard-arm commented Sep 25, 2024

Here we go:

thread '<unnamed>' panicked at /home/runner/work/polars/polars/crates/polars-error/src/lib.rs:45:37:
sink_Parquet(ParquetWriteOptions { compression: Lz4Raw, statistics: StatisticsOptions { min_value: true, max_value: true, distinct_count: false, null_count: true }, row_group_size: None, data_page_size: None, maintain_order: true }) not yet supported in standard engine. Use 'collect().write_parquet()'
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <polars_error::ErrString as core::convert::From<T>>::from::panic_cold_display
   3: <polars_error::ErrString as core::convert::From<T>>::from
   4: polars_mem_engine::planner::lp::create_physical_plan_impl
   5: polars_lazy::frame::LazyFrame::prepare_collect
   6: polars_lazy::frame::LazyFrame::sink
   7: polars_python::lazyframe::general::<impl polars_python::lazyframe::PyLazyFrame>::sink_parquet
   8: polars_python::lazyframe::general::<impl polars_python::lazyframe::PyLazyFrame>::__pymethod_sink_parquet__
   9: pyo3::impl_::trampoline::trampoline
  10: polars_python::lazyframe::general::_::__INVENTORY::trampoline
  11: method_vectorcall_VARARGS_KEYWORDS
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/descrobject.c:364:14
  12: _PyObject_VectorcallTstate
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
  13: PyObject_Vectorcall
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:299:12
  14: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23
  15: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  16: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  17: _PyVectorcall_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
  18: _PyObject_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
  19: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  20: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  21: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  22: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  23: _PyObject_VectorcallTstate
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
  24: method_vectorcall
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18
  25: _PyVectorcall_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
  26: _PyObject_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
  27: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  28: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  29: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  30: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  31: _PyVectorcall_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
  32: _PyObject_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
  33: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  34: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  35: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  36: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  37: _PyVectorcall_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
  38: _PyObject_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
  39: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  40: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  41: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  42: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  43: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  44: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  45: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  46: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  47: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  48: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  49: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  50: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  51: _PyVectorcall_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
  52: _PyObject_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
  53: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  54: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  55: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  56: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  57: _PyObject_VectorcallTstate
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
  58: method_vectorcall
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18
  59: _PyVectorcall_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
  60: _PyObject_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
  61: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  62: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  63: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  64: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  65: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  66: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  67: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  68: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  69: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  70: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  71: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  72: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  73: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  74: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  75: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  76: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  77: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  78: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  79: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  80: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  81: _PyVectorcall_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
  82: _PyObject_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
  83: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  84: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  85: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  86: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  87: _PyVectorcall_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
  88: _PyObject_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
  89: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  90: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  91: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
  92: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
  93: _PyObject_VectorcallTstate
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
  94: method_vectorcall
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18
  95: _PyVectorcall_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
  96: _PyObject_Call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
  97: do_call_core
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
  98: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
  99: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
 100: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
 101: _PyObject_FastCallDictTstate
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:141:15
 102: _PyObject_Call_Prepend
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:482:24
 103: slot_tp_init
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:7855:15
 104: type_call
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:1103:19
 105: _PyObject_MakeTpCall
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:214:18
 106: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23
 107: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
 108: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
 109: PyEval_EvalCode
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:1148:21
 110: builtin_exec_impl
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/bltinmodule.c:1077:17
 111: builtin_exec
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/clinic/bltinmodule.c.h:465:20
 112: cfunction_vectorcall_FASTCALL_KEYWORDS
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/methodobject.c:443:24
 113: _PyObject_VectorcallTstate
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
 114: PyObject_Vectorcall
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:299:12
 115: _PyEval_EvalFrameDefault
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23
 116: _PyEval_EvalFrame
             at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
 117: _PyEval_Vector
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
 118: pymain_run_module
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:300:14
 119: pymain_run_python
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:595:21
 120: Py_RunMain
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:680:5
 121: pymain_main
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:710:12
 122: Py_BytesMain
             at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:734:12
 123: <unknown>
 124: __libc_start_main
 125: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@ritchie46
Copy link
Member

Hmm... I don't understand where the parquet writer comes from? Is that somewhere else?

@douglas-raillard-arm
Copy link
Contributor Author

I think this failure is down the line in another place, on another dataframe. So enabling these options "fixed" the issue reported here. I'll make another run and see whether that behavior is stable.

@douglas-raillard-arm
Copy link
Contributor Author

Did another run, same output failing in sink_parquet(): https://readthedocs.org/api/v2/build/25750324.txt

@douglas-raillard-arm
Copy link
Contributor Author

douglas-raillard-arm commented Oct 3, 2024

I re-ran the code with the sink_parquet() removed, and the issue is the same as before, now with polars 1.9.0:
https://readthedocs.org/api/v2/build/25824188.txt

  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/lazyframe/frame.py", line 2050, in collect
    return wrap_df(ldf.collect(callback))
                   ^^^^^^^^^^^^^^^^^^^^^
pyo3_runtime.PanicException: Series: line, length 1 doesn't match the DataFrame height of 3

And the verbose backtrace:

thread '' panicked at /home/runner/work/polars/polars/crates/polars-error/src/lib.rs:45:37:
Series: line, length 1 doesn't match the DataFrame height of 3

If you want this Series to be broadcasted, ensure it is a scalar (for instance by adding '.first()').
stack backtrace:
0: 0x7f522b35c98f - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hef94149e34fd3e35
1: 0x7f52270c8ed3 - core::fmt::write::h819a4812d9188cb7
2: 0x7f522b320eb2 - std::io::Write::write_fmt::hf02218f278604e55
3: 0x7f522b35e012 - std::sys::backtrace::BacktraceLock::print::h083ca4ba72ccf19b
4: 0x7f522b35de74 - std::panicking::default_hook::{{closure}}::h6315662661f8bf89
5: 0x7f522b35e5e8 - std::panicking::rust_panic_with_hook::h86983346224fbabd
6: 0x7f522b35e158 - std::panicking::begin_panic_handler::{{closure}}::h8f4980b007e577ab
7: 0x7f522b35e0b9 - std::sys::backtrace::_rust_end_short_backtrace::h94ead2b80c5d4a2c
8: 0x7f522b35e0ae - rust_begin_unwind
9: 0x7f52270c746f - core::panicking::panic_fmt::h62749edbb2a4703e
10: 0x7f5227690ff7 - <polars_error::ErrString as core::convert::From>::from::panic_cold_display::h0422432d23cb6a45
11: 0x7f52286109e1 - <polars_error::ErrString as core::convert::From>::from::h6244b1c6667b3c09
12: 0x7f5228706081 - polars_mem_engine::executors::projection_utils::check_expand_literals::hfafbab8300d43d9e
13: 0x7f5228703016 - polars_mem_engine::executors::projection::ProjectionExec::execute_impl::h31eba3e3c1a600f7
14: 0x7f5228702475 - <polars_mem_engine::executors::projection::ProjectionExec as polars_mem_engine::executors::executor::Executor>::execute::h5064cd7033a3aaa2
15: 0x7f5228800b34 - <polars_mem_engine::executors::udf::UdfExec as polars_mem_engine::executors::executor::Executor>::execute::hf0ee8e35d70c633c
16: 0x7f52287fcafc - <polars_mem_engine::executors::stack::StackExec as polars_mem_engine::executors::executor::Executor>::execute::h7889471b8002069f
17: 0x7f52287fcafc - <polars_mem_engine::executors::stack::StackExec as polars_mem_engine::executors::executor::Executor>::execute::h7889471b8002069f
18: 0x7f5228800b34 - <polars_mem_engine::executors::udf::UdfExec as polars_mem_engine::executors::executor::Executor>::execute::hf0ee8e35d70c633c
19: 0x7f52285ec11f - polars_lazy::frame::LazyFrame::collect::h2cf25f81c710fe6b
20: 0x7f522a5b0f3e - polars_python::lazyframe::general::::pymethod_collect::h46bdc0e011300fc1
21: 0x7f5229dda1e8 - pyo3::impl
::trampoline::trampoline::h4527e662b3f15518
22: 0x7f522a591711 - polars_python::lazyframe::general::_::__INVENTORY::trampoline::h8f533870aeecd10d
23: 0x7f5242669792 - method_vectorcall_VARARGS_KEYWORDS
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/descrobject.c:364:14
24: 0x7f524265ca38 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
25: 0x7f524265ca38 - PyObject_Vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:299:12
26: 0x7f52425ff5df - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23
27: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
28: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
29: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
30: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
31: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
32: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
33: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
34: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
35: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
36: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
37: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
38: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
39: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
40: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
41: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
42: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
43: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
44: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
45: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
46: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
47: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
48: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
49: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
50: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
51: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
52: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
53: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
54: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
55: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
56: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
57: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
58: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
59: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
60: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
61: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
62: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
63: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
64: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
65: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
66: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
67: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
68: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
69: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
70: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
71: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
72: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
73: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
74: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
75: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
76: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
77: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
78: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
79: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
80: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
81: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
82: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
83: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
84: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
85: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
86: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
87: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
88: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
89: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
90: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
91: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
92: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
93: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
94: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
95: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
96: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
97: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
98: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
99: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
100: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
101: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
102: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
103: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
104: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
105: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
106: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
107: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
108: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
109: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
110: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
111: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
112: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
113: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
114: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
115: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
116: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
117: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
118: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
119: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
120: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
121: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
122: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
123: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
124: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
125: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
126: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
127: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
128: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
129: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
130: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
131: 0x7f524265f4b6 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
132: 0x7f524265f4b6 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18
133: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
134: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
135: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
136: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
137: 0x7f524265c574 - _PyObject_FastCallDictTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:152:15
138: 0x7f524265c830 - _PyObject_Call_Prepend
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:482:24
139: 0x7f52426d219b - slot_tp_init
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:7855:15
140: 0x7f52426c96e7 - type_call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:1103:19
141: 0x7f524265c387 - _PyObject_MakeTpCall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:214:18
142: 0x7f52425ff5df - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23
143: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
144: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
145: 0x7f524265f548 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
146: 0x7f524265f548 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18
147: 0x7f524265c180 - _PyVectorcall_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
148: 0x7f524265c180 - _PyObject_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
149: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
150: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
151: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
152: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
153: 0x7f524265f548 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
154: 0x7f524265f548 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18
155: 0x7f524265c180 - _PyVectorcall_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
156: 0x7f524265c180 - _PyObject_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
157: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
158: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
159: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
160: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
161: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
162: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
163: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
164: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
165: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
166: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
167: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
168: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
169: 0x7f524282a02e - bounded_lru_cache_wrapper
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Modules/_functoolsmodule.c:1021:14
170: 0x7f524265c07c - _PyObject_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:343:19
171: 0x7f524265c07c - _PyObject_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:313:1
172: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
173: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
174: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
175: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
176: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
177: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
178: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
179: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
180: 0x7f524265c92e - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
181: 0x7f524265c92e - PyObject_CallOneArg
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:376:12
182: 0x7f52426b2c9f - _PyObject_GenericGetAttrWithDict
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/object.c:1278:19
183: 0x7f52426b257b - PyObject_GetAttr
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/object.c:916:19
184: 0x7f52425fe341 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:3461:29
185: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
186: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
187: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
188: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
189: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
190: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
191: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
192: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
193: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
194: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
195: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
196: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
197: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
198: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
199: 0x7f524265c180 - _PyVectorcall_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
200: 0x7f524265c180 - _PyObject_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
201: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
202: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
203: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
204: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
205: 0x7f524265c180 - _PyVectorcall_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
206: 0x7f524265c180 - _PyObject_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
207: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
208: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
209: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
210: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
211: 0x7f524265f548 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
212: 0x7f524265f548 - method_vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18
213: 0x7f524265c180 - _PyVectorcall_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24
214: 0x7f524265c180 - _PyObject_Call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16
215: 0x7f52425fff26 - do_call_core
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12
216: 0x7f52425fff26 - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22
217: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
218: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
219: 0x7f524265c508 - _PyObject_FastCallDictTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:141:15
220: 0x7f524265c7c9 - _PyObject_Call_Prepend
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:482:24
221: 0x7f52426d219b - slot_tp_init
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:7855:15
222: 0x7f52426c96e7 - type_call
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:1103:19
223: 0x7f524265c387 - _PyObject_MakeTpCall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:214:18
224: 0x7f52425ff5df - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23
225: 0x7f52427578df - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
226: 0x7f52427578df - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
227: 0x7f52427578df - PyEval_EvalCode
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:1148:21
228: 0x7f52427537f0 - builtin_exec_impl
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/bltinmodule.c:1077:17
229: 0x7f52427537f0 - builtin_exec
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/clinic/bltinmodule.c.h:465:20
230: 0x7f52426ae0f6 - cfunction_vectorcall_FASTCALL_KEYWORDS
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/methodobject.c:443:24
231: 0x7f524265ca38 - _PyObject_VectorcallTstate
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11
232: 0x7f524265ca38 - PyObject_Vectorcall
at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:299:12
233: 0x7f52425ff5df - _PyEval_EvalFrameDefault
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23
234: 0x7f5242757a41 - _PyEval_EvalFrame
at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16
235: 0x7f5242757a41 - _PyEval_Vector
at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24
236: 0x7f52427c4b37 - pymain_run_module
at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:300:14
237: 0x7f52427c5243 - pymain_run_python
at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:595:21
238: 0x7f52427c5243 - Py_RunMain
at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:680:5
239: 0x7f52427c5ace - pymain_main
at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:710:12
240: 0x7f52427c5ace - Py_BytesMain
at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:734:12
241: 0x7f52422f1d90 -
242: 0x7f52422f1e40 - __libc_start_main
243: 0x560becdb0095 - _start
244: 0x0 -

@ritchie46
Copy link
Member

Alright, I know where it happens now. Added the same trick, so you should (hopefully) get an error message showing the expression that caused it.

And a way to temporarily silence the error. Can you come back with the faulting expression after next release?

@douglas-raillard-arm
Copy link
Contributor Author

Sounds good, thanks

@douglas-raillard-arm
Copy link
Contributor Author

Looks like I get another issue now with 1.11 , related to the type of the column (Time should be u64, not a string): https://readthedocs.org/api/v2/build/26067058.txt

I'll investigate further, with enough luck that can be reproduced locally and it's possibly hiding the original issue we discussed here.

@douglas-raillard-arm
Copy link
Contributor Author

douglas-raillard-arm commented Oct 25, 2024

@ritchie46 I tried locally with polars 1.11 both with Python 3.11 and 3.12 and it runs without problems. It only fails in the CI, so I guess this is just the new manifestation of the same underlying issue:

https://readthedocs.org/api/v2/build/26068615.txt

pyo3_runtime.PanicException: unexpected value while building Series of type Int64; found value of type String: "Time"

This happens while converting the following pandas df to polars:

pl.from_pandas(df, include_index=True)
          __cpu  __pid  frequency  cpu  __comm
Time                                          
0.004580      5      0     450000    0  <idle>
0.004582      5      0     450000    3  <idle>
0.004585      5      0     450000    4  <idle>
0.004587      5      0     450000    5  <idle>
0.050529      0   3807     575000    0    sshd
...         ...    ...        ...  ...     ...
2.484556      5      0     450000    3  <idle>
2.484558      5      0     450000    4  <idle>
2.484560      5      0     450000    5  <idle>
2.496534      1   5741     950000    1    sshd
2.496535      1   5741     950000    2    sshd

[352 rows x 5 columns]

df.info() shows this

<class 'pandas.core.frame.DataFrame'>
Index: 352 entries, 0.00457992 to 2.4965352800000002
Data columns (total 5 columns):
 #   Column     Non-Null Count  Dtype   
---  ------     --------------  -----   
 0   __cpu      352 non-null    uint32  
 1   __pid      352 non-null    int32   
 2   frequency  352 non-null    uint32  
 3   cpu        352 non-null    uint32  
 4   __comm     352 non-null    category
dtypes: category(1), int32(1), uint32(3)
memory usage: 9.3 KB

And the index is float64:

Index([           0.00457992, 0.0045823800000000005,            0.00458452,
                  0.00458656,            0.05052936,            0.05053342,
                  0.05053676,            0.05054004,  0.060652920000000006,
         0.06065624000000001,
       ...
                  2.47257768,            2.47257974,            2.48102298,
                  2.48102532,    2.4845535620000003,            2.48455628,
                  2.48455826,             2.4845601,            2.49653368,
          2.4965352800000002],
      dtype='float64', name='Time', length=352)

EDIT: s/include_index='Time'/include_index=True/

@ritchie46
Copy link
Member

Hi @douglas-raillard-arm any update on this one?

@douglas-raillard-arm
Copy link
Contributor Author

@ritchie46 Just gave it a go and the issue(s) is still there in polars 1.15:

thread '<unnamed>' panicked at /home/runner/work/polars/polars/crates/polars-error/src/lib.rs:45:37:
sink_Parquet(ParquetWriteOptions { compression: Lz4Raw, statistics: StatisticsOptions { min_value: true, max_value: true, distinct_count: false, null_count: true }, row_group_size: None, data_page_size: None, maintain_order: true }) not yet supported in standard engine. Use 'collect().write_Parquet(ParquetWriteOptions { compression: Lz4Raw, statistics: StatisticsOptions { min_value: true, max_value: true, distinct_count: false, null_count: true }, row_group_size: None, data_page_size: None, maintain_order: true })()'
stack backtrace:
   0:     0x7fcd86628a0f - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha5052ab5ff3c1e3a
   1:     0x7fcd81da3c73 - core::fmt::write::h5b239c6d20536434
   2:     0x7fcd865ec0a2 - std::io::Write::write_fmt::h5ee6fc7528ddcfea
   3:     0x7fcd8662a0a2 - std::sys::backtrace::BacktraceLock::print::h9cda523fdf439d92
   4:     0x7fcd86629f02 - std::panicking::default_hook::{{closure}}::h3accbea1a715bd28
   5:     0x7fcd8662a666 - std::panicking::rust_panic_with_hook::h4b5dc9e94093f690
   6:     0x7fcd8662a1e8 - std::panicking::begin_panic_handler::{{closure}}::h19547257d9b32c91
   7:     0x7fcd8662a149 - std::sys::backtrace::__rust_end_short_backtrace::h6da94030023c8711
   8:     0x7fcd8662a13e - rust_begin_unwind
   9:     0x7fcd81da1ccf - core::panicking::panic_fmt::hf0151e0c7f0d5c5e
  10:     0x7fcd83708b87 - <polars_error::ErrString as core::convert::From<T>>::from::panic_cold_display::h005018236c3c9f0c
  11:     0x7fcd83502991 - <polars_error::ErrString as core::convert::From<T>>::from::h3d69e294487878d1
  12:     0x7fcd836fc67d - polars_mem_engine::planner::lp::create_physical_plan_impl::hb57e932a8e1ea2f0
  13:     0x7fcd834e2947 - polars_lazy::frame::LazyFrame::prepare_collect::hf842bab6bd000277
  14:     0x7fcd834ec056 - polars_lazy::frame::LazyFrame::sink::hb290e98979b1b755
  15:     0x7fcd854b0a02 - polars_python::lazyframe::general::<impl polars_python::lazyframe::PyLazyFrame>::sink_parquet::hab3fac2c6741e0eb
  16:     0x7fcd854b05de - polars_python::lazyframe::general::<impl polars_python::lazyframe::PyLazyFrame>::__pymethod_sink_parquet__::h5a0f04fcd2c4e289
  17:     0x7fcd84d0c1e9 - pyo3::impl_::trampoline::trampoline::h21b25154a58e5aa6
  18:     0x7fcd854920d1 - polars_python::lazyframe::general::_::__INVENTORY::trampoline::h31857d80948aae9a
  19:     0x7fcd9d42fb42 - method_vectorcall_VARARGS_KEYWORDS
                               at /tmp/python-build.20241105161150.522/Python-3.11.10/Objects/descrobject.c:364:14
  20:     0x7fcd9d422de8 - _PyObject_VectorcallTstate
                               at /tmp/python-build.20241105161150.522/Python-3.11.10/./Include/internal/pycore_call.h:92:11
  21:     0x7fcd9d422de8 - PyObject_Vectorcall
                               at /tmp/python-build.20241105161150.522/Python-3.11.10/Objects/call.c:299:12
  22:     0x7fcd9d3c55df - _PyEval_EvalFrameDefault
                               at /tmp/python-build.20241105161150.522/Python-3.11.10/Python/ceval.c:4769:23 

   File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/lazyframe/frame.py", line 2366, in sink_parquet
    return lf.sink_parquet(
           ^^^^^^^^^^^^^^^^
pyo3_runtime.PanicException: sink_Parquet(ParquetWriteOptions { compression: Lz4Raw, statistics: StatisticsOptions { min_value: true, max_value: true, distinct_count: false, null_count: true }, row_group_size: None, data_page_size: None, maintain_order: true }) not yet supported in standard engine. Use 'collect().write_Parquet(ParquetWriteOptions { compression: Lz4Raw, statistics: StatisticsOptions { min_value: true, max_value: true, distinct_count: false, null_count: true }, row_group_size: None, data_page_size: None, maintain_order: true })()' 

https://app.readthedocs.org/api/v2/build/26403808.txt

If I skip that sink_parquet(), it later fails in a collect():

thread 'polars-1' panicked at /home/runner/work/polars/polars/crates/polars-error/src/lib.rs:45:37:
"__POLARS_REPLACE_MASK" not found
stack backtrace:
   0:     0x7fa150e28a0f - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha5052ab5ff3c1e3a
   1:     0x7fa14c5a3c73 - core::fmt::write::h5b239c6d20536434
   2:     0x7fa150dec0a2 - std::io::Write::write_fmt::h5ee6fc7528ddcfea
   3:     0x7fa150e2a0a2 - std::sys::backtrace::BacktraceLock::print::h9cda523fdf439d92
   4:     0x7fa150e29f02 - std::panicking::default_hook::{{closure}}::h3accbea1a715bd28
   5:     0x7fa150e2a666 - std::panicking::rust_panic_with_hook::h4b5dc9e94093f690
   6:     0x7fa150e2a1e8 - std::panicking::begin_panic_handler::{{closure}}::h19547257d9b32c91
   7:     0x7fa150e2a149 - std::sys::backtrace::__rust_end_short_backtrace::h6da94030023c8711
   8:     0x7fa150e2a13e - rust_begin_unwind
   9:     0x7fa14c5a1ccf - core::panicking::panic_fmt::hf0151e0c7f0d5c5e
  10:     0x7fa14df08b87 - <polars_error::ErrString as core::convert::From<T>>::from::panic_cold_display::h005018236c3c9f0c
  11:     0x7fa14cb98811 - <polars_error::ErrString as core::convert::From<T>>::from::hf0a1d7c66bc9e75c
  12:     0x7fa14d5c6432 - polars_core::frame::DataFrame::check_name_to_idx::ha6d2ad543774b6f4
  13:     0x7fa14e85a74a - polars_ops::series::ops::replace::replace_by_multiple::h902864c58ef81574
  14:     0x7fa14f31f618 - <F as polars_plan::dsl::expr_dyn_fn::ColumnsUdf>::call_udf::h7f643b4c6ed02d11
  15:     0x7fa14d839b0a - polars_expr::expressions::apply::ApplyExpr::eval_and_flatten::h156913e78e5af020
  16:     0x7fa14d838db5 - <polars_expr::expressions::apply::ApplyExpr as polars_expr::expressions::PhysicalExpr>::evaluate::h23d5f4abddba211e
  17:     0x7fa14d8371b9 - <polars_expr::expressions::alias::AliasExpr as polars_expr::expressions::PhysicalExpr>::evaluate::h9aaecfc0a0471302
  18:     0x7fa14de10686 - rayon::iter::plumbing::bridge_producer_consumer::helper::h5c50c93897517138
  19:     0x7fa14de1165c - <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute::h9e0d25c12b2a23e0
  20:     0x7fa150b58085 - rayon_core::registry::WorkerThread::wait_until_cold::hc05a8e01b38efb78
  21:     0x7fa150b5b364 - std::sys::backtrace::__rust_begin_short_backtrace::hae4ea54e486a3f27
  22:     0x7fa150b5b09c - core::ops::function::FnOnce::call_once{{vtable.shim}}::h4bb564107e833904
  23:     0x7fa150e2cbdb - std::sys::pal::unix::thread::Thread::new::thread_start::hfd205fc1309e19ca
  24:     0x7fa1678e4ac3 - <unknown>
  25:     0x7fa167975a04 - clone
  26:                0x0 - <unknown

  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/checkouts/test-rtd/lisa/datautils.py", line 324, in _df_to_pandas
    df = df.collect()
         ^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/lazyframe/frame.py", line 2029, in collect
    return wrap_df(ldf.collect(callback))
                   ^^^^^^^^^^^^^^^^^^^^^
pyo3_runtime.PanicException: "__POLARS_REPLACE_MASK" not found

https://app.readthedocs.org/api/v2/build/26403916.txt

Both builds were executed with:

RUST_BACKTRACE=full
POLARS_ALLOW_NON_SCALAR_EXP=1
POLARS_PANIC_ON_ERR=1

@douglas-raillard-arm
Copy link
Contributor Author

Polars 1.16 still exhibits the same issue: https://app.readthedocs.org/api/v2/build/26455310.txt

thread '<unnamed>' panicked at /home/runner/work/polars/polars/crates/polars-error/src/lib.rs:45:37:
sink_Parquet(ParquetWriteOptions { compression: Lz4Raw, statistics: StatisticsOptions { min_value: true, max_value: true, distinct_count: false, null_count: true }, row_group_size: None, data_page_size: None, maintain_order: true }) not yet supported in standard engine. Use 'collect().write_Parquet(ParquetWriteOptions { compression: Lz4Raw, statistics: StatisticsOptions { min_value: true, max_value: true, distinct_count: false, null_count: true }, row_group_size: None, data_page_size: None, maintain_order: true })()'
stack backtrace:
   0:     0x7fbc794b10df - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha5052ab5ff3c1e3a
   1:     0x7fbc74bb4993 - core::fmt::write::h5b239c6d20536434
   2:     0x7fbc79474772 - std::io::Write::write_fmt::h5ee6fc7528ddcfea
   3:     0x7fbc794b2772 - std::sys::backtrace::BacktraceLock::print::h9cda523fdf439d92
   4:     0x7fbc794b25d2 - std::panicking::default_hook::{{closure}}::h3accbea1a715bd28
   5:     0x7fbc794b2d36 - std::panicking::rust_panic_with_hook::h4b5dc9e94093f690
   6:     0x7fbc794b28b8 - std::panicking::begin_panic_handler::{{closure}}::h19547257d9b32c91
   7:     0x7fbc794b2819 - std::sys::backtrace::__rust_end_short_backtrace::h6da94030023c8711
   8:     0x7fbc794b280e - rust_begin_unwind
   9:     0x7fbc74bb29ef - core::panicking::panic_fmt::hf0151e0c7f0d5c5e
  10:     0x7fbc7631b6a7 - <polars_error::ErrString as core::convert::From<T>>::from::panic_cold_display::h04c904cd598f788f
  11:     0x7fbc7631b5d1 - <polars_error::ErrString as core::convert::From<T>>::from::hf07bf3d61a33795e
  12:     0x7fbc7651aa0d - polars_mem_engine::planner::lp::create_physical_plan_impl::h8f6476441f36ccaf
  13:     0x7fbc762fa847 - polars_lazy::frame::LazyFrame::prepare_collect::hcd1f758207f8d11c
  14:     0x7fbc763045da - polars_lazy::frame::LazyFrame::sink::h6e94052e85567264
  15:     0x7fbc7831fa12 - polars_python::lazyframe::general::<impl polars_python::lazyframe::PyLazyFrame>::sink_parquet::hc4a9cc187df1b0c6
  16:     0x7fbc7831f5ee - polars_python::lazyframe::general::<impl polars_python::lazyframe::PyLazyFrame>::__pymethod_sink_parquet__::h3a9aadd1adfd04cf
  17:     0x7fbc77b345b9 - pyo3::impl_::trampoline::trampoline::h478ac922154ccde6
  18:     0x7fbc78300811 - polars_python::lazyframe::general::_::__INVENTORY::trampoline::h648aec434d013640
  19:     0x7fbc90255b42 - method_vectorcall_VARARGS_KEYWORDS
                               at /tmp/python-build.20241105161150.522/Python-3.11.10/Objects/descrobject.c:364:14

@nameexhaustion
Copy link
Collaborator

I notice that the process may be getting forked - it could be worth to test running without forking, or move the polars import until after the process has been forked.

@douglas-raillard-arm
Copy link
Contributor Author

@nameexhaustion if you mean setting "POLARS_ALLOW_FORKING_THREAD=1", this is due to this issue:
#20000

So the process should not be forked (at least not in LISA nor devlib unless I missed a spot, in another dependency it's unlikely but not impossible).

@nameexhaustion
Copy link
Collaborator

I see

I had a closer look at the latest logs you sent - I realized the error message looks like it is due to attempting to sink_parquet() on a query plan that doesn't fully support streaming. But it is for some reason panicking - could you perhaps have set POLARS_PANIC_ON_ERR?

Could you check if a collect() then write_parquet() works?

@douglas-raillard-arm
Copy link
Contributor Author

Yes, this was set on that advice: #18896 (comment)

I'll try with the collect() first. AFAIR that triggers the originally reported issue, so let's see what happens on the current polars version.

@douglas-raillard-arm
Copy link
Contributor Author

@nameexhaustion It looks like the original issue is either gone or masked by another problem:

thread 'polars-0' panicked at /home/runner/work/polars/polars/crates/polars-error/src/lib.rs:45:37:
unsupported output type for dictionary packing: Duration(Nanosecond)

https://readthedocs.org/api/v2/build/26530794.txt

It's quite possible that new problem just triggers on a dataframe processed before the one that was triggering the issue.

@douglas-raillard-arm
Copy link
Contributor Author

douglas-raillard-arm commented Dec 9, 2024

So if I remove all code that tries to write to parquet (I can since it's only a cache), I hit that error:

  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/_utils/getitem.py", line 308, in _select_rows
    s = pl.Series("", key, dtype=Int64)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/series/series.py", line 289, in __init__
    self._s = sequence_to_pyseries(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/_utils/construction/series.py", line 144, in sequence_to_pyseries
    pyseries = _construct_series_with_fallbacks(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/_utils/construction/series.py", line 334, in _construct_series_with_fallbacks
    return PySeries.new_from_any_values_and_dtype(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyo3_runtime.PanicException: unexpected value while building Series of type Int64; found value of type String: "Time"

https://readthedocs.org/api/v2/build/26530866.txt

EDIT: I managed to reproduce locally, so assuming this is a bug on my part, it may be that the original problem is solved and all I need is fix that and disable the env var that turns errors into panics. The Duration(nanoseconds) issue will probably constitute another bug report if it's real).

EDIT2: looks like that issue is coming from the env var: #20228
I'll re-run with it unset to see what happens

@douglas-raillard-arm
Copy link
Contributor Author

So it seems the original issue is fixed. The only one left is the env var problem for which I opened a separate ticket, but it's secondary.

@nameexhaustion
Copy link
Collaborator

nameexhaustion commented Dec 10, 2024

@nameexhaustion nameexhaustion changed the title Broadcasting issue Series length 1 doesn't match DataFrame height 3 in select() Dec 10, 2024
@nameexhaustion nameexhaustion removed the needs triage Awaiting prioritization by a maintainer label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Related to Python Polars
Projects
None yet
Development

No branches or pull requests

3 participants