zhiyzuo / python-scopus

PyScopus
http://zhiyzuo.github.io/python-scopus/
MIT License
23 stars 29 forks source link

KeyError: 'search-results' #21

Closed css19 closed 4 years ago

css19 commented 4 years ago

Thank you for making PyScopus! I have an API key. However when I try to run the code author_result_df = scopus.search_author("AUTHLASTNAME(Zuo) and AUTHFIRST(Zhiya) and AFFIL(Iowa)")

I get the following error message: File "searchSCOPUS.py", line 44, in setup() File "searchSCOPUS.py", line 25, in setup author_result_df = scopus.search_author("AUTHLASTNAME(Zuo) and AUTHFIRST(Zhiya) and AFFIL(Iowa)") File "/miniconda3/lib/python3.7/site-packages/pyscopus/scopus.py", line 96, in searchauthor return self.search(query, count, type=2, view=view) File "/miniconda3/lib/python3.7/site-packages/pyscopus/scopus.py", line 56, in search result_df, total_count = _searchscopus(self.apikey, query, type, view=view) File "/miniconda3/lib/python3.7/site-packages/pyscopus/utils.py", line 388, in _search_scopus total_count = int(js['search-results']['opensearch:totalResults']) KeyError: 'search-results'

Is there a way to fix this keyError?

rashidhaffadi commented 4 years ago

the same here. did you solve the problem ?

css19 commented 4 years ago

No, I haven't had any luck yet. Please let me know if you find a solution!

zhiyzuo commented 4 years ago

Please try using your affiliation (e.g., university) VPN if you're using your work internet. I test PyScopus without any problem.

Duplicate of #20