to_dict doesn't work on a PubMedAuthor

Issue #16 resolved
created an issue

Calling to_dict on a PubMedAuthor object results in a NameError. Here is a basic example:

import metapub
fetch = metapub.PubMedFetcher()
pmid = "16048924"
article = fetch.article_by_pmid(pmid)

first_author_dict = article.author_list[0].to_dict()

Expected output: a dictionary with author information.

Observed output:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/zohixe92/python2.7/lib/python2.7/site-packages/metapub/", line 38, in to_dict
NameError: global name 'content' is not defined

Comments (2)

  1. Log in to comment