edsu / etudier

Extract a citation network from Google Scholar
161 stars 27 forks source link

UnboundLocalError #1

Closed edsu closed 6 years ago

edsu commented 6 years ago

Running etudier on this yields a UnboundLocalError exception after running for a bit:

./etudier.py --depth 2 'https://scholar.google.com/scholar?cites=12216592182874495788&as_sdt=20000005&sciodt=0,21&hl=en'
...
https://scholar.google.com/scholar?cites=4696240701634903645&as_sdt=20000005&sciodt=0,21&hl=en
Traceback (most recent call last):
  File "./etudier.py", line 266, in <module>
    main(args.url, output=args.output, depth=args.depth, pages=args.pages)
  File "./etudier.py", line 20, in main
    for from_pub, to_pub in get_citations(url, depth=depth, pages=pages):
  File "./etudier.py", line 91, in get_citations
    pages=pages
  File "./etudier.py", line 91, in get_citations
    pages=pages
  File "./etudier.py", line 76, in get_citations
    'id': article_id,
UnboundLocalError: local variable 'article_id' referenced before assignment
shawngraham commented 6 years ago

yep, that's what i was getting. weird, eh?

edsu commented 6 years ago

Ok, v0.0.2 was just released which should have a fix for this. See 21ecfc3 for the details.