rescript error:TypeError: Default value for parameter 'reads_per_batch' is not of semantic QIIME type Int % Range(0, None) or `None`.

I am on qiime2 v 2020.11, Once i I install rescript (via git clone) for training-feature-classifiers, I get the following error:

QIIME is caching your current deployment for improved performance. This may take a few moments and should only happen once per deployment.
Traceback (most recent call last):
File “/home/mcs/miniconda3/envs/qiime2-2020.11/bin/qiime”, line 11, in
sys.exit(qiime())
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/click/core.py”, line 1254, in invoke
cmd_name, cmd, args = self.resolve_command(ctx, args)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/click/core.py”, line 1297, in resolve_command
cmd = self.get_command(ctx, cmd_name)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2cli/commands.py”, line 100, in get_command
plugin = self._plugin_lookup[name]
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2cli/commands.py”, line 76, in _plugin_lookup
import q2cli.core.cache
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2cli/core/cache.py”, line 406, in
CACHE = DeploymentCache()
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2cli/core/cache.py”, line 61, in init
self._state = self._get_cached_state(refresh=refresh)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2cli/core/cache.py”, line 107, in _get_cached_state
self._cache_current_state(current_requirements)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2cli/core/cache.py”, line 200, in _cache_current_state
state = self._get_current_state()
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2cli/core/cache.py”, line 238, in _get_current_state
plugin_manager = qiime2.sdk.PluginManager()
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py”, line 54, in new
self._init(add_plugins=add_plugins)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py”, line 81, in _init
plugin = entry_point.load()
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/pkg_resources/init.py”, line 2472, in load
return self.resolve()
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/pkg_resources/init.py”, line 2478, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/rescript/plugin_setup.py”, line 144, in
citations=[citations[‘bokulich2018optimizing’]]
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/plugin/plugin.py”, line 301, in register_function
deprecated, examples)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 526, in _init
output_descriptions)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/core/type/signature.py”, line 118, in init
self._assert_valid_parameters(parameters)
File “/home/mcs/miniconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/core/type/signature.py”, line 270, in _assert_valid_parameters
% (param_name, spec.qiime_type))
TypeError: Default value for parameter ‘reads_per_batch’ is not of semantic QIIME type Int % Range(0, None) or None

Hi @razz1618 ,

The current release of RESCRIPt (2021.2.0) is incompatible with that version of QIIME 2. Please install the current release of QIIME 2 (2021.2).

Alternatively, you could install a previous release of RESCRIPt (2020.11) that is compatible with the version of QIIME 2 that you are running. You can find that release here.

Good luck!

2 Likes

Thanks. The RESCRIPt (2020.11) worked perfectly.

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.