Venn Diagram: crashes on sparse
- Dominant language
- Python
- Stars
- 5.7k
- Forks
- 1.1k
- Avg merge
- 12d 2h
- Merged PRs (30d)
- 1
Description
**What's wrong?**
Venn Diagram crashes when fed sparse data from text add-on.
```
---------------------------- ValueError Exception -----------------------------
Traceback (most recent call last):
File "/Users/ajda/envs/o3/lib/python3.9/site-packages/orangecanvas/scheme/signalmanager.py", line 1024, in __process_next
if self.__process_next_helper(use_max_active=True):
File "/Users/ajda/envs/o3/lib/python3.9/site-packages/orangecanvas/scheme/signalmanager.py", line 1062, in __process_next_helper
self.process_node(selected_node)
File "/Users/ajda/envs/o3/lib/python3.9/site-packages/orangecanvas/scheme/signalmanager.py", line 690, in process_node
self.send_to_node(node, signals_in)
File "/Users/ajda/orange/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 806, in send_to_node
self.process_signals_for_widget(node, widget, signals)
File "/Users/ajda/orange/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 820, in process_signals_for_widget
process_signals_for_widget(widget, signals, workflow)
File "/usr/local/Cellar/python@3.9/3.9.1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/functools.py", line 877, in wrapper
return dispatch(args[0].__class__)(*args, **kw)
File "/Users/ajda/orange/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 923, in process_signals_for_widget
handle_new_signals(widget, workflow)
File "/usr/local/Cellar/python@3.9/3.9.1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/functools.py", line 877, in wrapper
return dispatch(args[0].__class__)(*args, **kw)
File "/Users/ajda/orange/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 910, in handle_new_signals
widget.handleNewSignals()
File "/Users/ajda/orange/orange3/Orange/widgets/visualize/owvenndiagram.py", line 262, in handleNewSignals
self._createDiagram()
File "/Users/ajda/orange/orange3/Orange/widgets/visualize/owvenndiagram.py", line 389, in _createDiagram
self._on_selectionChanged()
File "/Users/ajda/orange/orange3/Orange/widgets/visualize/owvenndiagram.py", line 397, in _on_selectionChanged
self.invalidateOutput()
File "/Users/ajda/orange/orange3/Orange/widgets/visualize/owvenndiagram.py", line 421, in invalidateOutput
self.commit.deferred()
File "/Users/ajda/orange/orange-widget-base/orangewidget/gui.py", line 1973, in conditional_commit
do_commit()
File "/Users/ajda/orange/orange-widget-base/orangewidget/gui.py", line 1981, in do_commit
commit.call()
File "/Users/ajda/orange/orange-widget-base/orangewidget/gui.py", line 1848, in call
acting_func(instance)
File "/Users/ajda/orange/orange3/Orange/widgets/visualize/owvenndiagram.py", line 736, in commit
annotated = self.create_from_columns(self.selected_items, self.data, False)
File "/Users/ajda/orange/orange3/Orange/widgets/visualize/owvenndiagram.py", line 562, in create_from_columns
annotated = self.extract_columnwise(var_dict, columns)
File "/Users/ajda/orange/orange3/Orange/widgets/visualize/owvenndiagram.py", line 481, in extract_columnwise
return self.merge_data(domain, values)
File "/Users/ajda/orange/orange3/Orange/widgets/visualize/owvenndiagram.py", line 438, in merge_data
X = np.hstack(values['attributes'])
File "<__array_function__ internals>", line 5, in hstack
File "/Users/ajda/envs/o3/lib/python3.9/site-packages/numpy/core/shape_base.py", line 346, in hstack
return _nx.concatenate(arrs, 1)
File "<__array_function__ internals>", line 5, in concatenate
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 2 has 1 dimension(s)
-------------------------------------------------------------------------------
```
**How can we reproduce the problem?**
Corpus - Bag of Words - Venn Diagram
**What's your environment?**
- Operating system: OSX
- Orange version: 3.30.2dev
- How you installed Orange: pip
P.s. It would be nice if one could use Venn for text mining to show, i.e. the intersection of words in the subcorpora or documents sharing the same words (Jaccard).
Contributor guide
Research direction
Start in Orange/widgets/visualize/owvenndiagram.py at handleNewSignals and follow _createDiagram through create_from_columns, extract_columnwise, and merge_data. Reproduce the Corpus - Bag of Words - Venn Diagram workflow with sparse data from the text add-on, then verify that Venn Diagram no longer crashes and produces its output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100