biopython: runningtime:generator didnot stop after throw

在运行某个蛋白【3NPS】的时候出现报错:

代码:

parse=PDBParse(QUIET=True)
structure=parser.get_structure(X,pdb)

报错:

 runningtime:generator didnot stop after throw 

 解决:

(1)检查是否biopython版本和python 版本不一致:

Biopython 支持多个 Python 版本,包括 Python 2 和 Python 3。具体来说:

  • Biopython 1.78 版本及之后的版本支持 Python 3,包括 Python 3.4-3.10 版本;
  • Biopython 1.76 至 1.77 版本支持 Python 2.6-2.7 和 Python 3.4-3.7 版本;
  • Biopython 1.75 版本及之前的版本仅支持 Python 2.x 版本。

因此,如果使用 Python 3.x 版本,则应使用 Biopython 1.78 或更高版本;如果使用 Python 2 版本,则可以选择使用 Biopython 1.76 至 1.77 版本。

需要注意的是,部分 Biopython 模块可能与特定的 Python 版本或操作系统不兼容,在使用过程中可能会出现兼容性问题,需要仔细查看官方文档并进行测试。此外

猜你喜欢

转载自blog.csdn.net/weixin_63016274/article/details/130779667