You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
arxiv.get_metadata doctest reports KeyError doi instead of the arXiv error #2805
A rerun shortly afterwards passed. The arXiv API delivers arxiv:doi 10.1109/JPROC.2015.2483592 for 1503.00759 and feedparser 6.0.14 maps it to arxiv_doi, so the data and the parsing are fine.
The KeyError hides the real cause: on a non 200 status, a network error or any other exception get_metadata returns a dict with only the key error, so the doctest cannot show what arXiv answered. The broad except Exception also hides parsing errors.
Proposal:
the doctest shows the error together with the doi, e.g.
I suppose usual tests would set up a mock arXiv when testing, while we are testing directly at the real service - and this can for various reasons fail.
Activity
fnielsen commentedon Oct 8, 2026
I suppose usual tests would set up a mock arXiv when testing, while we are testing directly at the real service - and this can for various reasons fail.