2

我是 python 新手,尤其是 Biopython。我正在尝试从 XML 文件中获取一些信息Entrez.efetch,然后读取它。上周这个脚本运行良好:

handle = Entrez.efetch(db="Protein", id="YP_008872780.1", retmode="xml")
records = Entrez.read(handle)

但现在我得到一个错误:

> Bio.Entrez.Parser.ValidationError: Failed to find tag 'GBSeq_xrefs' in
    the DTD. To skip all tags that are not represented in the DTD, please
    call Bio.Entrez.read or Bio.Entrez.parse with validate=False.

所以我运行这个:

records = Entrez.read(handle, validate=False)

但我仍然收到一个错误:

TypeError: 'str' object does not support item assignment

经过一些研究,我意识到 NCBI 对在 xml 文件(GenPept 的)中创建新标签进行了新的更改RefSeq

我是否需要更改 DTD 中的某些内容以支持这些新标签?

4

1 回答 1

0

看来我的 DTD 文件已过期。
可以在此处此处找到新版本。

于 2014-05-07T07:46:28.357 回答