TypeError: BLAST6 is not a variant of SampleData.field['type']

I installed q2-types to get silvadata
my commend is
conda install qiime2::q2-types
Collecting package metadata (current_repodata.json): done
Solving environment: done

but two type errors are occured
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/bin/qiime", line 11, in
sys.exit(qiime())
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1054, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 920, in make_context
self.parse_args(ctx, args)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/click/command.py", line 43, in parse_args
return super().parse_args(ctx, args)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1610, in parse_args
echo(ctx.get_help(), color=ctx.color)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 699, in get_help
return self.command.get_help(self)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1298, in get_help
self.format_help(ctx, formatter)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1331, in format_help
self.format_options(ctx, formatter)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/click/command.py", line 157, in format_options
for subcommand in self.list_commands(ctx):
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/commands.py", line 92, in list_commands
plugins = sorted(self._plugin_lookup)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/commands.py", line 76, in _plugin_lookup
import q2cli.core.cache
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 285, in
CACHE = DeploymentCache()
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 61, in init
self._state = self._get_cached_state(refresh=refresh)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 107, in _get_cached_state
self._cache_current_state(current_requirements)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 205, in _cache_current_state
state = self._get_current_state()
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 253, in _get_current_state
plugin_manager = q2cli.util.get_plugin_manager()
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/util.py", line 278, in get_plugin_manager
return qiime2.sdk.PluginManager()
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 67, in new
self._init(add_plugins=add_plugins)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 105, in _init
plugin = entry_point.load()
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/pkg_resources/init.py", line 2477, in load
return self.resolve()
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/pkg_resources/init.py", line 2483, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_types_genomics/init.py", line 16, in
importlib.import_module("q2_types_genomics.kaiju")
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_types_genomics/kaiju/init.py", line 9, in
from ._format import KaijuIndexFormat, KaijuDBDirectoryFormat
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_types_genomics/kaiju/_format.py", line 9, in
from q2_types_genomics.reference_db._format import (
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_types_genomics/reference_db/init.py", line 10, in
from q2_types_genomics.reference_db._type import (
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_types_genomics/reference_db/_type.py", line 11, in
from q2_types_genomics.plugin_setup import plugin
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_types_genomics/plugin_setup.py", line 36, in
importlib.import_module('q2_types_genomics.per_sample_data')
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_types_genomics/per_sample_data/init.py", line 16, in
from ._type import (
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_types_genomics/per_sample_data/_type.py", line 64, in
SampleData[BLAST6],
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/core/type/grammar.py", line 172, in getitem
self.template.validate_fields_expr(self, fields)
File "/home/omicspublic/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/core/type/semantic.py", line 223, in validate_fields_expr
raise TypeError("%r is not a variant of %r" % (expr, varf))
TypeError: BLAST6 is not a variant of SampleData.field['type']

How can I solve it? please,,,,,,,

Hello @youngeun,

Welcome to the forums! :qiime2:

Qiime2 is distributed through its own conda channel. Perhaps adding that conda channel with -c would solve the problem?

conda install -c https://packages.qiime2.org/qiime2/2024.5/tiny/released qiime2::q2-types

I also put my commend below
conda activate qiime2-2023.2
conda create -y -n rescript
conda activate rescript
conda install
-c conda-forge -c bioconda -c qiime2 -c 2023.2-tested -c defaults
qiime2 q2cli q2templates q2-types q2-longitudinal q2-feature-classifier 'q2-types-genomics>2023.2'
"pandas>=0.25.3" xmltodict ncbi-datasets-pylib
As a result, I can not use any qiime2 function due to same error
And i want to return it the original stage. If i remove the packages, can i return it?

I see...

While conda allows you to modify conda environments, that can cause problems for already installed software packages. Yes, a full reinstall should fix this problem.

Also, newer versions of Qiime2 include RESCRIPt so you can get silvadata immediately!

1 Like

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