Rescript "ImportError"

Dear QIIME2 Team!

I want to use Rescript to reverse transcribe rna-sequences (from Silva) to dna sequences. I have just upgraded to the latest version of QIIME2 (2023.2) installed via conda in a new environment. Thereafter I installed Rescript in my activated QIIME2-2023.2 environment:

conda install -c conda-forge -c bioconda -c qiime2 -c 2023.5-tested -c defaults xmltodict 'q2-types-genomics>2023.2' ncbi-datasets-pylib

pip install git+https://github.com/bokulich-lab/RESCRIPt.git

qiime dev refresh-cache

The installation seemed to work just fine (no error messages and everything seemed to work when typing qiime rescript --help).

However, when trying to run following command:

qiime rescript reverse-transcribe
--i-rna-sequences silva-rna-neighbor-seqs-Desulfotomaculia-depth1.qza
--o-dna-sequences transcribed-silva-rna-neighbor-seqs-Desulfotomaculia-depth1.qza
--verbose

I got the following error:

Traceback (most recent call last):
File "/home/emelie/miniconda3/envs/qiime2-2023.2/bin/qiime", line 11, in
sys.exit(qiime())
File "/home/emelie/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/emelie/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/emelie/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/emelie/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/emelie/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/emelie/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/emelie/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/commands.py", line 326, in call
from qiime2.sdk import ResultCollection
ImportError: cannot import name 'ResultCollection' from 'qiime2.sdk' (/home/emelie/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/sdk/init.py)

Can anyone help me to solve this error?

Kindly
/Emelie

Hello @emst7885,

I believe your version of q2cli is a little out of sync with your version of qiime2. Reinstalling qiime2 from the 2023.5 channel here should fix this error.

5 Likes

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