Plugin error from sample-classifier: Value must have type '<class 'int'>'

Hello there!

Please find below the following command and the error message.

qiime sample-classifier classify-samples
–i-table $inputFileOTU
–m-metadata-file metadata-wgs-human.tsv
–m-metadata-column group
–p-optimize-feature-selection
–p-parameter-tuning
–p-estimator RandomForestClassifier
–p-n-estimators 100
–p-random-state 200
–output-dir $outputDir

Traceback (most recent call last):
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2cli/commands.py”, line 329, in call
results = action(**arguments)
File “”, line 2, in classify_samples
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 245, in bound_callable
output_types, provenance)
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 484, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2_sample_classifier/classify.py”, line 177, in classify_samples
summary, = summarize_estimator(sample_estimator)
File “”, line 2, in summarize
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 245, in bound_callable
output_types, provenance)
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 452, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2_sample_classifier/classify.py”, line 383, in summarize
_summarize_estimator(output_dir, sample_estimator)
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2_sample_classifier/utilities.py”, line 532, in _summarize_estimator
title=‘Estimator Summary’)
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2_sample_classifier/utilities.py”, line 538, in _visualize
pd.set_option(‘display.max_colwidth’, None)
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/pandas/core/config.py”, line 227, in call
return self.func(*args, **kwds)
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/pandas/core/config.py”, line 123, in _set_option
o.validator(v)
File “/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/pandas/core/config.py”, line 760, in inner
raise ValueError(msg.format(typ=_type))
ValueError: Value must have type ‘<class ‘int’>’

My current pandas version is 0.25.0. When I tried to install it to version 1.1.5, it gives the following error and hence I downgraded it back to version 0.25.0:

There was a problem loading /Users/promidas/Documents/Projects/FMTD/analysesWGS/qiita/featureTable/human-species-table.qza as a QIIME 2 Result:
(pandas 1.1.5 (/Users/promidas/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages), Requirement.parse(‘pandas<1,>=0.24.0’))

Could you please tell me how to fix the error?
Plugin error from sample-classifier: Value must have type ‘<class ‘int’>’

Thanks,
Promi.

Hi @prdas,

As you surmised, the issue is that you have the wrong version of pandas installed. At some point you must have installed something in your conda environment that illegally downgraded pandas. See here for related discussion:

I recommend creating a fresh installation.

Good luck!

1 Like