wpoa / open-access-media-importer

A tool for harvesting media files from Open Access articles for upload into Wikimedia Commons
http://commons.wikimedia.org/wiki/User:Open_Access_Media_Importer_Bot
23 stars 8 forks source link

AttributeError: 'NoneType' object has no attribute 'split' #64

Closed Daniel-Mietchen closed 11 years ago

Daniel-Mietchen commented 11 years ago

This error breaks calls of oami_pmc_pmcid_import by way of seq . If there is no DOI, it should just skip the article.

echo 3515051 | ./oami_pmc_pmcid_import Input PMCIDs, delimited by whitespace: Removing “/home/daniel/.cache/open-access-media-importer/metadata/raw/pmc_pmcid/efetch.fcgi0” … done. Removing “/home/daniel/.cache/open-access-media-importer/metadata/raw/pmc_pmcid/efetch.fcgi1” … done. Removing “/home/daniel/.cache/open-access-media-importer/metadata/raw/pmc_pmcid/efetch.fcgi2” … done. Downloading “http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pmc&id=3515051”, saving into directory “/home/daniel/.cache/open-access-media-importer/metadata/raw/pmc_pmcid” … 100% |##########################################################################################################################################################################################################| Oman Medical Journal 2012 Abstracts 3rd Pan-Arab Rhinology Society Conference No or element found in XML. /usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py:463: SAWarning: Unicode type received non-unicode bind param value. param.append(processorskey) Traceback (most recent call last): File "./oa-cache", line 233, in doi_prefix = doi.split('/')[0] AttributeError: 'NoneType' object has no attribute 'split'

erlehmann commented 11 years ago

PMC 3515051 appears to have no DOI.

erlehmann commented 11 years ago

3013915700f5bbc1652829953464b988b8a510da fixes it.