Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scopus403Error: Use of the cursor parameter is restricted #100

Open
ZhouKanglei opened this issue Nov 5, 2024 · 0 comments
Open

Scopus403Error: Use of the cursor parameter is restricted #100

ZhouKanglei opened this issue Nov 5, 2024 · 0 comments

Comments

@ZhouKanglei
Copy link

{
"name": "Scopus403Error",
"message": "Use of the cursor parameter is restricted",
"stack": "---------------------------------------------------------------------------
Scopus403Error Traceback (most recent call last)
Cell In[7], line 7
3 pybliometrics.scopus.init()
5 logging.getLogger().setLevel(logging.CRITICAL)
----> 7 docs_scopus, docs_notfound = litstudy.refine_scopus(docs_remaining)
9 print(len(docs_scopus), 'papers found on Scopus')
10 print(len(docs_notfound), 'papers were not found and were discarded')

File ~/anaconda3/envs/pytorch/lib/python3.9/site-packages/litstudy/sources/scopus.py:248, in refine_scopus(docs, search_title)
244 return ScopusDocument.from_eid(record.eid)
246 return None
--> 248 return docs._refine_docs(callback)

File ~/anaconda3/envs/pytorch/lib/python3.9/site-packages/litstudy/types.py:53, in DocumentSet._refine_docs(self, callback)
50 old_docs = []
52 for i, doc in enumerate(progress_bar(self.docs)):
---> 53 new_doc = callback(doc)
55 if new_doc is not None:
56 new_indices.append(i)

File ~/anaconda3/envs/pytorch/lib/python3.9/site-packages/litstudy/sources/scopus.py:236, in refine_scopus..callback(doc)
234 if len(title) > 10 and search_title:
235 query = f"TITLE({title})"
--> 236 response = ScopusSearch(query, view="STANDARD", download=False)
237 nresults = response.get_results_size()
239 if nresults > 0 and nresults < 10:

File ~/anaconda3/envs/pytorch/lib/python3.9/site-packages/pybliometrics/scopus/scopus_search.py:214, in ScopusSearch.init(self, query, refresh, view, verbose, download, integrity_fields, integrity_action, subscriber, unescape, **kwds)
212 self._query = query
213 self._view = view
--> 214 Search.init(self, query=query, api='ScopusSearch', size=size,
215 cursor=subscriber, download=download,
216 verbose=verbose, **kwds)
217 self.unescape = unescape

File ~/anaconda3/envs/pytorch/lib/python3.9/site-packages/pybliometrics/scopus/superclasses/search.py:66, in Search.init(self, query, api, size, cursor, download, verbose, **kwds)
63 self._cache_file_path = parent/self._view/stem
65 # Init
---> 66 Base.init(self, params=params, url=URLS[api], download=download,
67 api=api, verbose=verbose)

File ~/anaconda3/envs/pytorch/lib/python3.9/site-packages/pybliometrics/scopus/superclasses/base.py:66, in Base.init(self, params, url, api, download, verbose, *args, **kwds)
64 self._json = loads(fname.read_text())
65 else:
---> 66 resp = get_content(url, api, params, *args, **kwds)
67 header = resp.headers
69 if ab_ref_retrieval:

File ~/anaconda3/envs/pytorch/lib/python3.9/site-packages/pybliometrics/scopus/utils/get_content.py:125, in get_content(url, api, params, **kwds)
123 except:
124 reason = ""
--> 125 raise errorsresp.status_code
126 except KeyError:
127 resp.raise_for_status()

Scopus403Error: Use of the cursor parameter is restricted"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant