pybliometrics-dev / pybliometrics

Python-based API-Wrapper to access Scopus
https://pybliometrics.readthedocs.io/en/stable/
Other
407 stars 127 forks source link

The resource specified cannot be found #248

Closed raffaem closed 2 years ago

raffaem commented 2 years ago

pybliometrics version: 3.2.1.dev2

Code to reproduce the bug:

$ python
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pybliometrics.scopus import AuthorRetrieval
>>> auth = AuthorRetrieval("57198211947")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\rdpclient\AppData\Local\Programs\Python\Python310\lib\site-packages\pybliometrics\scopus\author_retrieval.py", line 246, in __init__
    Retrieval.__init__(self, identifier=self._id, api='AuthorRetrieval')
  File "C:\Users\rdpclient\AppData\Local\Programs\Python\Python310\lib\site-packages\pybliometrics\scopus\superclasses\retrieval.py", line 48, in __init__
    Base.__init__(self, params=params, url=url, api=api)
  File "C:\Users\rdpclient\AppData\Local\Programs\Python\Python310\lib\site-packages\pybliometrics\scopus\superclasses\base.py", line 59, in __init__
    resp = get_content(url, api, params, *args, **kwds)
  File "C:\Users\rdpclient\AppData\Local\Programs\Python\Python310\lib\site-packages\pybliometrics\scopus\utils\get_content.py", line 99, in get_content
    raise errors[resp.status_code](reason)
pybliometrics.scopus.exception.Scopus404Error: The resource specified cannot be found.
Michael-E-Rose commented 2 years ago

But why is this a bug? The author doesn't exist: https://www.scopus.com/authid/detail.uri?authorId=57198211947

raffaem commented 2 years ago

But why is this a bug? The author doesn't exist: https://www.scopus.com/authid/detail.uri?authorId=57198211947

Indeed.

We are updating a database we have for some quite time, so I'm 100% sure that this author used to exist.

Scopus evidently deleted him, even without merging with another profile.

(I don't know why they would do that).

There isn't anything that pybliometrics could do here I guess.