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

Data Table crashes after a sequence #1067

Open
ajdapretnar opened this issue Jul 1, 2024 · 0 comments
Open

Data Table crashes after a sequence #1067

ajdapretnar opened this issue Jul 1, 2024 · 0 comments

Comments

@ajdapretnar
Copy link
Collaborator

Describe the bug
A crash occurs on text data with Data Table is connected to Corpus Viewer (after BOW).

---------------------------- ValueError Exception -----------------------------
Traceback (most recent call last):
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangecanvas/scheme/signalmanager.py", line 1180, in __process_next
    if self.__process_next_helper(use_max_active=True):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangecanvas/scheme/signalmanager.py", line 1218, in __process_next_helper
    self.process_node(selected_node)
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangecanvas/scheme/signalmanager.py", line 846, in process_node
    self.send_to_node(node, signals_in)
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangewidget/workflow/widgetsscheme.py", line 806, in send_to_node
    self.process_signals_for_widget(node, widget, signals)
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangewidget/workflow/widgetsscheme.py", line 820, in process_signals_for_widget
    process_signals_for_widget(widget, signals, workflow)
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/functools.py", line 909, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangewidget/workflow/widgetsscheme.py", line 923, in process_signals_for_widget
    process_signal_input(input_meta, widget, signal, workflow)
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/functools.py", line 909, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangewidget/workflow/widgetsscheme.py", line 886, in process_signal_input_default
    notify_input_helper(
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/functools.py", line 909, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangewidget/utils/signals.py", line 735, in set_input_helper
    handler(*args)
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangewidget/utils/signals.py", line 208, in summarize_wrapper
    method(widget, value)
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/Orange/widgets/data/owtable.py", line 285, in set_dataset
    summary = tsummary.table_summary(data)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/Orange/widgets/data/utils/tablesummary.py", line 67, in table_summary
    bstats = datacaching.getCached(
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/Orange/widgets/utils/datacaching.py", line 15, in getCached
    info[funct] = res = funct(*params, **kwparams)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/Orange/statistics/basic_stats.py", line 40, in __init__
    data._compute_basic_stats(include_metas=include_metas,
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/Orange/data/table.py", line 2028, in _compute_basic_stats
    rr.append(fast_stats(self._X, W,
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/Orange/statistics/util.py", line 356, in stats
    return np.column_stack((
           ^^^^^^^^^^^^^^^^^
  File "<__array_function__ internals>", line 200, in column_stack
  File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/lib/shape_base.py", line 656, in column_stack
    return _nx.concatenate(arrays, 1)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<__array_function__ internals>", line 200, in concatenate
ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 10865 and the array at index 4 has size 1
-------------------------------------------------------------------------------

To Reproduce
Steps to reproduce the behavior:

  1. Corpus (book-excerpts)
  2. BOW
  3. Corpus Viewer: select a single document
  4. Data Table

Expected behavior
No crash.

Orange version:
3.37.0

Text add-on version:
1.15.0

Operating system:
OSX

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