jonathansick / ads_bibdesk

(Unmaintained) Mac OS X service for frictionless import of NASA ADS and arXiv publications into BibDesk.
GNU General Public License v3.0
37 stars 20 forks source link

Bug for one specific arxiv file #26

Closed keflavich closed 10 years ago

keflavich commented 11 years ago

First time I've encountered a bug in a few weeks...

$ adsbibdesk arXiv:1305.0235
Starting ADS to BibDesk
ADS to BibDesk version 3.1
Python: 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
[GCC 4.2.1 (Apple Inc. build 5664)]
process_token found article token arXiv:1305.0235
ADSConnector found arXiv ID arXiv:1305.0235
ADSHTMLParser found links: {u'bibtex': u'http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2013arXiv1305.0235B&data_type=BIBTEX&db_key=PRE&nocookieset=1',
 u'custom': u'http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?bibcode=2013arXiv1305.0235B&data_type=Custom&format=%5c%5cbibitem%5b%25%5c2m%25%28y%29%5d%25%7bR%7d%20%25%5c5.3l%20%25%5cY,%25%5cj,%25%5cV,%25%5cp%5cn&return_fmt=LONG&db_key=PRE&nocookieset=1',
 u'preprint': u'http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2013arXiv1305.0235B&link_type=PREPRINT&db_key=PRE'}
arXiv PDF (http://arXiv.org/pdf/1305.0235)
Traceback (most recent call last):
  File "/Users/adam/virtual-python/bin/adsbibdesk", line 9, in <module>
    load_entry_point('adsbibdesk==3.1', 'console_scripts', 'adsbibdesk')()
  File "/Users/adam/virtual-python/lib/python2.7/site-packages/adsbibdesk-3.1-py2.7.egg/adsbibdesk.py", line 175, in main
    process_articles(args, prefs)
  File "/Users/adam/virtual-python/lib/python2.7/site-packages/adsbibdesk-3.1-py2.7.egg/adsbibdesk.py", line 192, in process_articles
    process_token(articleToken, prefs, bibdesk)
  File "/Users/adam/virtual-python/lib/python2.7/site-packages/adsbibdesk-3.1-py2.7.egg/adsbibdesk.py", line 290, in process_token
    pub = pub.descriptorAtIndex_(1).descriptorAtIndex_(3).stringValue()  # pub id
AttributeError: 'NoneType' object has no attribute 'descriptorAtIndex_'
jonathansick commented 11 years ago

This may have been fixed with version 3.1.1 (released just now).

pip install -U adsbibdesk

and try again? Let me know!

The new Service is also on the webpage.

keflavich commented 11 years ago

Success:

Starting ADS to BibDesk
ADS to BibDesk version 3.0.5
Python: 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
[GCC 4.2.1 (Apple Inc. build 5664)]
process_token found article token arXiv:1305.0235
ADSConnector found arXiv ID arXiv:1305.0235
process_token derived url http://adsabs.harvard.edu/cgi-bin/bib_query?arXiv:1305.0235
ADSHTMLParser found links: {u'references': u'http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2013arXiv1305.0235B&link_type=REFERENCES&db_key=PRE&high=', u'ar': u'http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2013arXiv1305.0235B&link_type=AR&db_key=PRE', u'preprint': u'http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2013arXiv1305.0235B&link_type=PREPRINT&db_key=PRE', u'bibtex': u'http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2013arXiv1305.0235B&data_type=BIBTEX&db_key=PRE&nocookieset=1', u'custom': u'http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?bibcode=2013arXiv1305.0235B&data_type=Custom&format=%5c%5cbibitem%5b%25%5c2m%25%28y%29%5d%25%7bR%7d%20%25%5c5.3l%20%25%5cY,%25%5cj,%25%5cV,%25%5cp%5cn&return_fmt=LONG&db_key=PRE&nocookieset=1'}
process_token payload in tmp file: /var/folders/ni/ni+DtdqFGMeSMH13AvkNkU+++TI/-Tmp-/tmpzqxZtO.txt
process_token osacript cmd: osascript /Users/adam/.adsbibdesk_injector_2.scpt "/var/folders/ni/ni+DtdqFGMeSMH13AvkNkU+++TI/-Tmp-/tmpzqxZtO.txt"