Error when running metrics

Apr 16, 2013 at 4:42 PM
Please see error message below:

Any help understanding what the problem is and how to fix it would be appreciated.


An unexpected problem occurred. If it occurs again, please copy the details to the clipboard by typing Ctrl-C, then post the details to


[ArgumentException]: An item with the same key has already been added.

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)

at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)

at System.Collections.Generic.Dictionary
2.Add(TKey key, TValue value)

at Smrf.NodeXL.Algorithms.SubgraphCalculator.GetSubgraphAsNewGraph(ICollection`1 verticesToInclude)

at Smrf.NodeXL.ExcelTemplate.GroupMetricCalculator2.TryCalculateGraphMetricsForOneGroup(ExcelTemplateGroupInfo oExcelTemplateGroupInfo, CalculateGraphMetricsContext oCalculateGraphMetricsContext, OverallMetrics& oOverallMetrics)

at Smrf.NodeXL.ExcelTemplate.GroupMetricCalculator2.TryCalculateGraphMetrics(IGraph graph, CalculateGraphMetricsContext calculateGraphMetricsContext, GraphMetricColumn[]& graphMetricColumns)

at Smrf.NodeXL.ExcelTemplate.GraphMetricCalculationManager.CalculateGraphMetricsAsyncInternal(CalculateGraphMetricsAsyncArgs oCalculateGraphMetricsAsyncArgs, BackgroundWorker oBackgroundWorker, DoWorkEventArgs oDoWorkEventArgs)

at Smrf.NodeXL.ExcelTemplate.GraphMetricCalculationManager.BackgroundWorker_DoWork(Object sender, DoWorkEventArgs e)

at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)

at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


Apr 17, 2013 at 2:23 AM
This can occur if you manually edit the Groups and Group Vertices worksheets and you make a mistake while doing so; namely, you include the same vertex twice in the same group on the Group Vertices worksheet.

How did you create your groups? You don't need to--and shouldn't--create groups by manually filling in the Groups and Group Vertices worksheets. NodeXL will fill them in for you when you use one of the "Group by" items on the NodeXL, Analysis, Groups menu. You can learn more about how to create groups in the "Creating Groups" topic at NodeXL, Help, Help.

-- Tony