Ticket #1348 (closed bug: fixed)

Opened 5 months ago

Last modified 4 months ago

Atribute Error when running k-means clustering

Reported by: RRBammann Owned by: ales
Milestone: Component: other
Severity: major Keywords:
Cc: Blocking:
Blocked By:


I keep receiving this Atribute Error when the widget k-means clustering runs on selected data.

The data I upload has 235 data instances, 21 features and 1 meta attribute. I then select 9 attributes (Select Attributes widget) and then send it to Data Table. In this widget I select the whole table (Data), and when k-means clustering finishes calculating, I receive the following information:

File "C:\Python27\lib\site-packages\Orange\OrangeCanvas\scheme\widgetsscheme.py", line 589, in process_signals_for_widget


File "C:\Python27\lib\site-packages\Orange\OrangeWidgets\Visualize\OWScatterPlot.py", line 259, in setData

data.name = "data"

AttributeError: 'NoneType' object has no attribute 'name'

This didn't use to happen before the Snapshot of Orange for Python 2.7 update.

After the k-means clustering widget, I connected another Data table widget, and when the table is selected, I receive the following error:

File "C:\Python27\lib\site-packages\Orange\OrangeCanvas\scheme\widgetsscheme.py", line 599, in process_signals_for_widget


File "C:\Python27\lib\site-packages\Orange\OrangeWidgets\Visualize\OWLinProj.py", line 307, in handleNewSignals

self.updateGraph(setAnchors = self.resetAnchors)

File "C:\Python27\lib\site-packages\Orange\OrangeWidgets\Visualize\OWLinProj.py", line 257, in updateGraph

self.graph.updateData(attrList, setAnchors, args)

File "C:\Python27\lib\site-packages\Orange\utils\init.py", line 201, in wrap_call

return func(*args, kwargs)

File "C:\Python27\lib\site-packages\Orange\OrangeWidgets\Visualize\OWLinProjGraph.py", line 323, in updateData

if self.useDifferentSymbols: curveSymbol = self.curveSymbols[int(self.originalData[self.dataClassIndex][i])]

IndexError: list index out of range

What could be the issue here?


Change History

comment:1 Changed 4 months ago by ales

  • Owner set to ales
  • Status changed from new to assigned

I fixed the first error, but cannot duplicate the second one.

Note that the error is actually from the Linear Projection widget. Can you provide more details about the inputs in to this widget.

comment:2 Changed 4 months ago by RRBammann


Indeed the first error doesn't appear anymore, thanks for that!

The second error still comes up. The Linear Projection widget can be directly connected to k-Means Clustering widget and the error comes up (however, instead of saying line 599, it's now line 600). The conection type is only Data. If I connect k-Means Clustering widget to Data Table widget, and then to Linear Projection widget (Data type of connection), the same error comes up. When I do the connection File -> Data Table -> Linear Projection widgets, the error doesn't come up, it seems only after using k-Means clustering.

Please let me know if you need any more information.


comment:3 Changed 4 months ago by Ales Erjavec <ales.erjavec@…>

  • Status changed from assigned to closed
  • Resolution set to fixed

In [7343891c80a1fa8c10717f28e0758350b2f1d4bb/orange]:

Fixed an IndexError in LinearProjection and Polyviz widget.

This occurred when the number of classes exceeded the number of available
distinct point symbols.

(fixes #1348)

Note: See TracTickets for help on using tickets.