CSP Error "float() argument must be a string or a real number, not 'tuple'

Dear all,

The CSP module is currently not working for me. When I click on ‘Fetch and Compute’, the following error message appears in the terminal:

INFO : Fitting started (ExperimentAnalysisGuiSettingsPanel._fitAndFetchOutputData:482)
TypeError: float() argument must be a string or a real number, not ‘tuple’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/home/user/Programs/ccpnmr/ccpnmr3/ccpnmr3.2.2/src/python/ccpn/ui/gui/modules/experimentAnalysis/ExperimentAnalysisGuiSettingsPanel.py”, line 498, in _fitAndFetchOutputData
outputDataTable = backend.fitInputData()
File “/home/user/Programs/ccpnmr/ccpnmr3/ccpnmr3.2.2/src/python/ccpn/framework/lib/experimentAnalysis/backends/ChemicalShiftPerturbationAnalysis.py”, line 85, in fitInputData
calculationFrame = self.currentCalculationModel.calculateValues(self.inputDataTables)
File “/home/user/Programs/ccpnmr/ccpnmr3/ccpnmr3.2.2/src/python/ccpn/framework/lib/experimentAnalysis/calculationModels/binding/CSPerturbationCalculationModels.py”, line 143, in calculateValues
outputFrame.loc[rowIndex, sv.COLLECTIONID] = collectionId
File “/home/user/Programs/ccpnmr/ccpnmr3/ccpnmr3.2.2/miniconda/lib/python3.10/site-packages/pandas/core/indexing.py”, line 849, in setitem
iloc._setitem_with_indexer(indexer, value, self.name)
File “/home/user/Programs/ccpnmr/ccpnmr3/ccpnmr3.2.2/miniconda/lib/python3.10/site-packages/pandas/core/indexing.py”, line 1837, in _setitem_with_indexer
self._setitem_single_block(indexer, value, name)
File “/home/user/Programs/ccpnmr/ccpnmr3/ccpnmr3.2.2/miniconda/lib/python3.10/site-packages/pandas/core/indexing.py”, line 2077, in _setitem_single_block
self.obj._mgr = self.obj._mgr.setitem(indexer=indexer, value=value)
File “/home/user/Programs/ccpnmr/ccpnmr3/ccpnmr3.2.2/miniconda/lib/python3.10/site-packages/pandas/core/internals/managers.py”, line 394, in setitem
return self.apply(“setitem”, indexer=indexer, value=value)
File “/home/user/Programs/ccpnmr/ccpnmr3/ccpnmr3.2.2/miniconda/lib/python3.10/site-packages/pandas/core/internals/managers.py”, line 352, in apply
applied = getattr(b, f)(**kwargs)
File “/home/user/Programs/ccpnmr/ccpnmr3/ccpnmr3.2.2/miniconda/lib/python3.10/site-packages/pandas/core/internals/blocks.py”, line 1067, in setitem
values[indexer] = casted
ValueError: setting an array element with a sequence.

This also occurs when I use projects that I have already fitted previously. Is this a general problem, or could it be due to incorrect installation?

Thank you in advance,
Jelena

Hi Jelena,

we don’t have any problems with this here, so it is most likely linked to your projects. Could it be that you have removed some of the Collections or other data from your projects or something like that?

I would recommend trying to go through the full process of Setting up the Input Collection and Input Data Table again before trying the Fetch and Compute. Or if you like you can send us one of your projects (email to support@ccpn.ac.uk) and we’ll take a look at what might be going on there.

Vicky

1 Like