bokulich-lab / q2-types-genomics

QIIME 2 types for genomics plugins.
BSD 3-Clause "New" or "Revised" License
6 stars 11 forks source link

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

Closed linlin-coder closed 1 year ago

linlin-coder commented 1 year ago

when i install this packages, It reported an error and displayed an error message as follows: this is my command:

qiime dev refresh-cache

this is failed message:

  File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2523, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_types_genomics-0+unknown-py3.8.egg/q2_types_genomics/__init__.py", line 16, in <module>
    importlib.import_module('q2_types_genomics.kraken2')
  File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_types_genomics-0+unknown-py3.8.egg/q2_types_genomics/kraken2/__init__.py", line 11, in <module>
    from ._format import (
  File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_types_genomics-0+unknown-py3.8.egg/q2_types_genomics/kraken2/_format.py", line 14, in <module>
    from ..per_sample_data._format import MultiDirValidationMixin
  File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_types_genomics-0+unknown-py3.8.egg/q2_types_genomics/per_sample_data/__init__.py", line 16, in <module>
    from ._type import (
  File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_types_genomics-0+unknown-py3.8.egg/q2_types_genomics/per_sample_data/_type.py", line 64, in <module>
    SampleData[BLAST6],
  File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/core/type/grammar.py", line 172, in __getitem__
    self.template.validate_fields_expr(self, fields)
  File "/opt/conda/envs/qiime2-2023.5/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']
linlin-coder commented 1 year ago

the install method is git clone mater, and python3 setup.py install

misialq commented 1 year ago

Hey @linlin-coder,

The most recent version of q2-types-genomics (the one you presumably installed) requires an updated version of q2-types (not officially released yet). To get it to work again you could install an earlier version by pointing to a different commit (e.g. f2d16d9) or installing the most recent version of https://github.com/qiime2/q2-types in addition. We usually recommend conda-based installations though (you can point conda to the https://packages.qiime2.org/qiime2/2023.5/tested channel to grab the recently released version of q2-types-genomics).

Hope that helps!