Giter Club home page Giter Club logo

pubmed-articles-grabber's People

Stargazers

 avatar

Watchers

 avatar

pubmed-articles-grabber's Issues

NameError in PubMedArticleGrabber.py

Description:
I encountered a NameError while trying to use the pubmed-articles-grabber program. When attempting to execute the grab() method, the script raises a NameError with the message "name 'cr' is not defined".

In [1]: from pubMedArticleGrabber import PubMedArticleGrabber

In [2]: wanted = PubMedArticleGrabber('wanted', '[email protected]')

In [3]: wanted.grab()
4
fetching..
woke up
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[3], line 1
----> 1 wanted.grab()

File ~/PubMed_Tools/pubmed-articles-grabber/pubMedArticleGrabber.py:59, in PubMedArticleGrabber.grab(self)
     57 """The main function to grab articles via both PubMedCentral and Crossref"""
     58 self.grabViaPMCOAI()
---> 59 self.grabViaCrossref()

File ~/PubMed_Tools/pubmed-articles-grabber/pubMedArticleGrabber.py:107, in PubMedArticleGrabber.grabViaCrossref(self)
    105 for doi in dois:
    106     try:
--> 107         articles.append(cr.works(ids=doi))
    108     except (HTTPError, requests.exceptions.HTTPError, URLError, CertificateError, requests.exceptions.SSLError, TimeoutError) as e:
    109         if 'Not Found' in str(e):

NameError: name 'cr' is not defined

I believe the issue can be resolved by properly defining or importing the cr variable before using it in the PubMedArticleGrabber.py script.

Any assistance in resolving this issue would be greatly appreciated. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.