You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get DOI absent using the title?y(yes, automatic)/m(manual)/n(do nothing)y
Traceback (most recent call last):
File "/home/user/bin/bibcure", line 177, in <module>
main()
File "/home/user/bin/bibcure", line 137, in main
bibs = update_bibs_get_doi(bibs)
File "/home/user/lib/python3.7/site-packages/bibcure/title.py", line 26, in update_bibs_get_doi
bibs[i] = update_bib(bib, get_first)
File "/home/user/lib/python3.7/site-packages/bibcure/title.py", line 10, in update_bib
found, bib_string = get_bib_from_title(bib["title"], get_first)
File "/home/user/lib/python3.7/site-packages/title2bib/crossref.py", line 86, in get_bib_from_title
found, item = get_from_title(title, get_first)
File "/home/user/lib/python3.7/site-packages/title2bib/crossref.py", line 50, in get_from_title
items = r.json()["message"]["items"]
TypeError: list indices must be integers or slices, not str
The text was updated successfully, but these errors were encountered:
Seems this error derives from an HTTP 400 error from the crossref API:
b'{"status":"failed","message-type":"validation-failure","message":[{"type":"unknown-parameter","value":"query.title","message":"Parameter query.title has been deprecated. Please use query.bibliographic instead. See https://status.crossref.org/incidents/4y45gj63jsp4 "}]}\n'
Change the query accordingly seems to fix the issue:
# title2bib/crossref.pydefget_from_title(title, get_first=False):
found=Falseparams= {"query.bibliographic": title, "rows": 20} # change title to bibliographicr=find_cross_info(params)
items=r.json()["message"]["items"]
If this is the correct way to fix it I can make a pull request later.
The text was updated successfully, but these errors were encountered: