r-xue / ads2bibdesk Goto Github PK
View Code? Open in Web Editor NEWads2bibdesk helps you add astrophysics articles listed on NASA/ADS to your BibDesk database using the new ADS Developer API
License: GNU General Public License v3.0
ads2bibdesk helps you add astrophysics articles listed on NASA/ADS to your BibDesk database using the new ADS Developer API
License: GNU General Public License v3.0
When running ads2bibdesk on the key ADS '1976JAtS...33.2049A', I get the following error:
Starting ADS to BibDesk
Traceback (most recent call last):
File "/Users/townsend/.local/lib/python3.7/site-packages/ads2bibdesk/ads2bibdesk.py", line 523, in notify
center.deliverNotification_(notification)
AttributeError: 'NoneType' object has no attribute 'deliverNotification_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/townsend/bin/ads2bibdesk", line 10, in
sys.exit(main())
File "/Users/townsend/.local/lib/python3.7/site-packages/ads2bibdesk/ads2bibdesk.py", line 110, in main
article_status = process_article(args, prefs)
File "/Users/townsend/.local/lib/python3.7/site-packages/ads2bibdesk/ads2bibdesk.py", line 142, in process_article
article_status = process_token(args.article_identifier, prefs, bibdesk)
File "/Users/townsend/.local/lib/python3.7/site-packages/ads2bibdesk/ads2bibdesk.py", line 269, in process_token
bibdesk('cite key', pid).stringValue(), ads_article.title[0], alert_sound=alert_sound)
File "/Users/townsend/.local/lib/python3.7/site-packages/ads2bibdesk/ads2bibdesk.py", line 526, in notify
except ExplicitException:
NameError: name 'ExplicitException' is not defined
Hoping for a quick fix!
ads2bibdesk 2023APh...15002850A
The above command imports the paper information as expected but its author list is truncated and and et al.
is added. Changing the ADS code to DOI 10.1016/j.astropartphys.2023.102850
does not help.
We can restore the "preprint-update" option from the original ads_bibdesk, by scanning/updating BibDesk entries with article_bibcode in the arXiv style (something like 2019arXiv1234.5678).
add an option to OCR older PDFs file using OCRmyPDF (if the text layer is not available).
One will get an error message from the AppleScript call of adding new BibTeX entries.
BibDesk got an error: document 1 doesn’t understand the “import” message.
temporary workaround: just don't upgrade to BibDesk v1.7.5 util the change is clarified.
update: reported the bug to the BibDesk developers and it will be fixed in their next release.
I am getting the following error message in the log, and nothing happens.
2021-06-17 11:48:14 ads2bibdesk.ads2bibdesk.main [INFO] : Starting ADS to BibDesk
2021-06-17 11:48:25 ads2bibdesk.ads2bibdesk.process_token [INFO] : Found Zero or Multiple ADS antries for [valid API key]
2021-06-17 11:48:25 ads2bibdesk.ads2bibdesk.process_token [INFO] : No update in BibDesk
I just created the .ads directory (so no pre-existing files present) and added my brand new API key from ADS to ads2bibdesk.cfg, but still got this error.
I recently updated from macOS High Sierra to Catalina. ads2bibdesk was working fine on High Sierra but now gives errors (see below). I'm trying to run this in python 3.7.9 managed with conda. Does this need a different version of ImageMagick? Are there other tricks or suggestions? Thanks.
ads2bibdesk_errors.txt
For some articles, the direct publisher PDF links are not available on ADS (e.g. 2014PhR...541...45C
, 2011Natur.470..233C
, 2015Sci...348..779H
). Therefore, the ArXiv-version PDFs were downloaded, instead of publisher-versions. Some last code changes in the forked ads_bibdesk
could be borrowed to help resolve the issue, by guessing the PDF direct link from the HTML link/content.
Thank you for this nice tool. While the command line works in the terminal, this is not the case for the workflow. As it never worked for me (using the new version since about 1 year or more maybe), I thought some may have the same issue so I decided to post the error. When I click to "add to bibdesk", I have the following error:
L’action « Exécuter un script Shell » a rencontré une erreur : « Starting ADS to BibDesk
Traceback (most recent call last):
File "/Users/agallenn/.local/bin/ads2bibdesk", line 33, in
sys.exit(load_entry_point('ads2bibdesk==0.2.dev3', 'console_scripts', 'ads2bibdesk')())
File "/Users/agallenn/.local/lib/python3.8/site-packages/ads2bibdesk/ads2bibdesk.py", line 111, in main
article_status = process_article(args, prefs)
File "/Users/agallenn/.local/lib/python3.8/site-packages/ads2bibdesk/ads2bibdesk.py", line 141, in process_article
bibdesk = BibDesk()
File "/Users/agallenn/.local/lib/python3.8/site-packages/ads2bibdesk/bibdesk.py", line 19, in init
self.refresh()
File "/Users/agallenn/.local/lib/python3.8/site-packages/ads2bibdesk/bibdesk.py", line 53, in refresh
self.titles = self('return title of publications', strlist=True)
File "/Users/agallenn/.local/lib/python3.8/site-packages/ads2bibdesk/bibdesk.py", line 44, in call
for i in range(output.numberOfItems())]
AttributeError: 'NoneType' object has no attribute 'numberOfItems' »
Note that I always had the same error since I installed your version.
Info system: MacOS 10.15.7, Python 3.8.10, Bibdesk 1.8.3
I am trying to use ads2bibdesk from the commandline. It worked fine until maybe a week ago when I used it last time. I have not used this for a week and have not updated the OS or python.
Now I get this "zero or multiple entries" error for basically any arXiv number I feed ...
Starting ADS to BibDesk
Found Zero or Multiple ADS antries for 2209.09905
am I the only one seeing this problem?
Dear r-xue,
I am a big fan of this code and use it all the time. However, yesterday I updated bibdesk and it appeared to stop working. The error message was as follows:
Starting ADS to BibDesk
Traceback (most recent call last):
File "/Users/hamish/.local/bin/ads2bibdesk", line 10, in
sys.exit(main())
File "/Users/hamish/.local/lib/python3.7/site-packages/ads2bibdesk.py", line 90, in main
article_status=process_article(args ,prefs)
File "/Users/hamish/.local/lib/python3.7/site-packages/ads2bibdesk.py", line 99, in process_article
article_status=process_token(args.article_identifier, prefs, bibdesk)
File "/Users/hamish/.local/lib/python3.7/site-packages/ads2bibdesk.py", line 234, in process_token
pub = pub.descriptorAtIndex_(1).descriptorAtIndex_(3).stringValue()
AttributeError: 'NoneType' object has no attribute 'descriptorAtIndex_'
Can you please help
EDIT: I just saw your post about not updating to 1.7.5. I have gone back to 1.7.4. Thanks again for all your effort with this program!
Dear r-xue,
This is an enhancement suggestion.
Is it possible for ads2bibdesk to name the downloaded PDFs using the first author name and the date. So your paper this year might be named Xue2020.pdf. And your second paper this year could be Xue2020b.pdf (etc etc).
Currently the papers that ads2bibdesk downloads for me have names like tmpav9l1brw.pdf
Kind regards
Adopting the Universal-citekeys may help consolidate .bib files from multiple sources. I will add my Python implementation (from ucitekey.py) into ads2bibdesk as an optional choice, so the newly added BibTeX entries could have the universal cite keys.
ADS is good, but does not have everything. Other serch engines that offer an API, such as inspirehep.net or cds.cern.ch can probably be added or even one can think of a new option for the user to configure which API address to use to search, is that envisageable?
Thanks
ads2bibdesk 10.3847/2041-8213/acdac6
downloads the paper PDF from arXiv instead of retrieving the final published PDF from ApJL.
Similar papers are downloaded as expected.
ads2bibdesk 10.3847/2041-8213/acda88
ads2bibdesk 10.3847/2041-8213/acda9a
For a long time I have been trying to find a way to disable downloading PDF automatically but failed. After digging into the code I realized there is a configuration file ~/.ads/ads2bibdesk.cfg
in which you can set download_pdf=False
. I know you have
The API key can be written into your ads2bibdesk preference file ~/.ads/ads2bibdesk.cfg (see the template)
in your README, but without a care read of the template, I didn't know there is a configuration file at all. I would be helpful to the readers if you could mention there is a configuration file where you can configure download_pdf
, ssh_user
, etc.
When I tried to run pip install --user -U --no-deps --force-reinstall --install-option="--service" ads2bibdesk
under Mac OS 14 with pip 23.1.2, I got an error no such option: --install-option
So following this discussion:
--install-option was deprecated in pip v22.3 and has been removed completely in v23.1.
I ran python -m pip install pip==22.2.1
and I was able to build the service.
Hopefully this is helpful and looking forward to an update addressing this issue.
Hi, after updating to Big Sur I can't make it to work. I get the error message below. Any advice appreciated.
Thanks,
Dimitris
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/ads2bibdesk", line 33, in
sys.exit(load_entry_point('ads2bibdesk==0.2.dev3', 'console_scripts', 'ads2bibdesk')())
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/ads2bibdesk", line 25, in importlib_load_entry_point
return next(matches).load()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ads2bibdesk/ads2bibdesk.py", line 22, in
from .bibdesk import BibDesk
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ads2bibdesk/bibdesk.py", line 5, in
import AppKit # from pyobjc-framework-Cocoa
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/AppKit/init.py", line 10, in
import Foundation
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/Foundation/init.py", line 9, in
import CoreFoundation
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/CoreFoundation/init.py", line 9, in
import objc
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/objc/init.py", line 6, in
from . import _objc
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/objc/_objc.cpython-39-darwin.so, 2): Symbol not found: _ffi_find_closure_for_code_np
Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/objc/_objc.cpython-39-darwin.so
Expected in: flat namespace
in /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/objc/_objc.cpython-39-darwin.so
Hi,
I'm running python 3.6, on 10.12. The code works well so far, with one exception - notify module results in error.
objc.lookUpClass('NSUserNotificationCenter').\
AttributeError: 'NoneType' object has no attribute 'scheduleNotification_'
During handling of the above exception, another exception occurred:
growl_notify(title, desc, sticky)
NameError: name 'growl_notify' is not defined
Commenting out the last line has fixed it, resulting in a successful download.
If there is no abstract the import will fail with
AttributeError: 'NoneType' object has no attribute 'replace'
> /Users/ebellm/Eric/Archive/Projects/ads2bibdesk/ads2bibdesk.py(240)process_token()
238
239 # abstract
--> 240 ads_abstract_clean=ads_article.abstract.replace('\\', r'\\').replace('"', r'\"').replace('}', ' ').replace('{', ' ')
241 bibdesk(f'set abstract to "{ads_abstract_clean}"', pub)
242
The list at least includes Safari and AppleNote.
Chrome seems to be fine. This was caused by macOS's sandboxing and the new Privacy feature.
related to jonathansick/ads_bibdesk#74
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.