以下代码返回一个空记录:
handle = Entrez.efetch(db="Taxonomy", id="158330", retmode="xml") #From biopython tutorial
records = Entrez.read(handle) #Record is empty
以下代码返回一个空记录:
handle = Entrez.efetch(db="Taxonomy", id="158330", retmode="xml") #From biopython tutorial
records = Entrez.read(handle) #Record is empty
我刚刚尝试过同样的事情,返回记录不为空。
In [20]: handle = Entrez.efetch(db="Taxonomy", id="158330", retmode="xml")
In [21]: records = Entrez.read(handle)
In [22]: records
Out[22]: [{u'Lineage': 'cellular organisms; Eukaryota; Viridiplantae; Streptophyta; Streptophytina; Embryophyta; Tracheophyta; Euphyllophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Orchidaceae', u'Division': 'Plants', u'ParentTaxId': '4747', u'PubDate': '2001/04/25 19:02:00', u'LineageEx': [{u'ScientificName': 'cellular organisms', u'TaxId': '131567', u'Rank': 'no rank'}, {u'ScientificName': 'Eukaryota', u'TaxId': '2759', u'Rank': 'superkingdom'}, {u'ScientificName': 'Viridiplantae', u'TaxId': '33090', u'Rank': 'kingdom'}, {u'ScientificName': 'Streptophyta', u'TaxId': '35493', u'Rank': 'phylum'}, {u'ScientificName': 'Streptophytina', u'TaxId': '131221', u'Rank': 'no rank'}, {u'ScientificName': 'Embryophyta', u'TaxId': '3193', u'Rank': 'no rank'}, {u'ScientificName': 'Tracheophyta', u'TaxId': '58023', u'Rank': 'no rank'}, {u'ScientificName': 'Euphyllophyta', u'TaxId': '78536', u'Rank': 'no rank'}, {u'ScientificName': 'Spermatophyta', u'TaxId': '58024', u'Rank': 'no rank'}, {u'ScientificName': 'Magnoliophyta', u'TaxId': '3398', u'Rank': 'no rank'}, {u'ScientificName': 'Liliopsida', u'TaxId': '4447', u'Rank': 'class'}, {u'ScientificName': 'Asparagales', u'TaxId': '73496', u'Rank': 'order'}, {u'ScientificName': 'Orchidaceae', u'TaxId': '4747', u'Rank': 'family'}], u'CreateDate': '2001/04/24 16:31:00', u'TaxId': '158330', u'Rank': 'subfamily', u'GeneticCode': {u'GCId': '1', u'GCName': 'Standard'}, u'ScientificName': 'Cypripedioideae', u'MitoGeneticCode': {u'MGCId': '1', u'MGCName': 'Standard'}, u'UpdateDate': '2001/04/24 16:31:00'}]