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

in the web app, processing of input table can cause a crash #267

Closed
mtiberti opened this issue Jul 11, 2024 · 0 comments · Fixed by #268
Closed

in the web app, processing of input table can cause a crash #267

mtiberti opened this issue Jul 11, 2024 · 0 comments · Fixed by #268

Comments

@mtiberti
Copy link
Contributor

Traceback is

  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
  File "/Users/tiberti/devel/MAVISp/pages/1_MAVISp_simple_mode.py", line 189, in <module>
    plots = plot_lolliplots(this_dataset_table)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 212, in wrapper
    return cached_func(*args, **kwargs)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 241, in __call__
    return self._get_or_create_cached_value(args, kwargs)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 267, in _get_or_create_cached_value
    return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 321, in _handle_cache_miss
    computed_value = self._info.func(*func_args, **func_kwargs)
  File "/Users/tiberti/devel/MAVISp/streamlit_utils.py", line 120, in plot_lolliplots
    _, processed_df = process_input_for_dotplot(df, d_cutoff=0.3, r_cutoff=0.5, g_cutoff=0.3)
  File "/Users/tiberti/devel/MAVISp/dot_plot.py", line 313, in process_input
    df.replace(effect_code,
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/pandas/core/generic.py", line 7819, in replace
    return self.replace(
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/pandas/core/generic.py", line 7867, in replace
    new_data = self._mgr.replace_list(
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/pandas/core/internals/base.py", line 253, in replace_list
    bm = self.apply_with_block(
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 354, in apply
    applied = getattr(b, f)(**kwargs)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/pandas/core/internals/blocks.py", line 865, in replace_list
    masks = list(masks)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/pandas/core/internals/blocks.py", line 852, in <genexpr>
    compare_or_regex_search(
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/pandas/core/array_algos/replace.py", line 98, in compare_or_regex_search
    result = op(a)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/numpy/lib/function_base.py", line 2372, in __call__
    return self._call_as_normal(*args, **kwargs)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/numpy/lib/function_base.py", line 2365, in _call_as_normal
    return self._vectorize_call(func=func, args=vargs)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/numpy/lib/function_base.py", line 2450, in _vectorize_call
    ufunc, otypes = self._get_ufunc_and_otypes(func=func, args=args)
  File "/Users/tiberti/devel/MAVISp/env/lib/python3.9/site-packages/numpy/lib/function_base.py", line 2406, in _get_ufunc_and_otypes
    raise ValueError('cannot call `vectorize` on size 0 inputs '
ValueError: cannot call `vectorize` on size 0 inputs unless `otypes` is set

this is most likely due to pandas-dev/pandas#54399

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

Successfully merging a pull request may close this issue.

1 participant