1. inconsistent use of tabs and spaces in indentation
1.1 报错
很诡异的问题,因为所有
py
脚本都是snakePipes自带的,我根本没动过。1.2 解决
- 先找到哪一步报错:
scRNAseq
脚本中cf.runAndCleanup
这一步:- 找到
cf
也就是snakePipes.common_functions
module: 路径:/path_to/anaconda3/envs/mamba/envs/snakePipes/lib/python3.12/site-packages/snakePipes/common_functions.py
查看runAndCleanup
:
- 继续找出问题的脚本:
- 因为上述报错是在运行下面这个命令后出错的,所以先找到
cmd
:- snakePipes会将
cmd
输出到log中,查找后得知出问题的应该在snakefile
,也就是/path_to/anaconda3/envs/mamba/envs/snakePipes/lib/python3.12/site-packages/snakePipes/workflows/scRNAseq/Snakefile
:
- 检查出问题脚本:
- 先备份该脚本
- vscode打开,找之前报错的
line 118
,发现确实是indentation混用的问题- 解决:
ctrl+shift+p
, 然后选择Convert Identation to Tabs
2. The ‘mamba’ command is not available in the shell
2.1 报错
2.2 原因及解决 把mamba的bin加入到环境变量中即可
3. Could not resolve host: mirrors.tuna.tsinghua.edu.cn
3.1 报错
3.2 原因及解决
- 原因:
mamba env create
会使用conda设置中默认的、优先级最前的channel,我的设置里是conda-forge:https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/
,所以最后会变成以下报错:RuntimeError: Download error (28) Timeout was reached [https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/repodata.json]
而这个地址是不存在的。
- 解决:
- 备份
.condarc
- 修改
.condarc
:
- 修改
channels
里优先级- 在
custom_channels
中添加mpi-ie: https://conda.anaconda.org/
.channels: - mpi-ie - conda-forge - defaults show_channel_urls: true custom_channels: mpi-ie: https://conda.anaconda.org/ ```
4. ERROR: Could not open file for download /data/extended/mambaf8uLNT88UCo: No such file or directory
4.1 报错
Could not create conda environment from /path_to/anaconda3/envs/mamba/envs/snakePipes/lib/python3.12/site-packages/snakePipes/shared/rules/envs/shared.yaml: Command: mamba env create --quiet --file "/path_to/anaconda3/envs/mamba/envs/8a730fff6bfd761c1a1a279a0c048d44_.yaml" --prefix "/path_to/anaconda3/envs/mamba/envs/8a730fff6bfd761c1a1a279a0c048d44_" Output: ERROR Could not open file for download /data/extended/mambaf8uLNT88UCo: No such file or directory
4.2 原因及解决
- 原因:没有在
defaults.yaml
中设置tempDir
,自动设置成了/data/extended/
,导致找不到路径- 解决:自定义
tempDir
即可。