sosia-dev / sosia

Sosia: Automatic author matching in Scopus on-line
https://sosia.readthedocs.io/
MIT License
11 stars 3 forks source link

Rise warning/error about a author id being merged from scopus to sosia #21

Open ste210 opened 5 years ago

ste210 commented 5 years ago

When a author id is merged and does not exist anymore, sosia provides an error, but from scopus one can see the warning. Maybe this can be adjusted...

[57201609495, 7004299063]
E:\Anaconda3\lib\site-packages\scopus\author_retrieval.py:215: UserWarning: Author profile with ID 57201609495 has been merged and the main profile is now one of 7004299063, 57205593771.  Please update your records manually.  Functionality of this object is reduced.
  warn(text, UserWarning)
Traceback (most recent call last):

  File "<ipython-input-1-1f5517ca9f0e>", line 47, in <module>
    pub_margin=0.2)

  File "E:\Anaconda3\lib\site-packages\sosia\sosia.py", line 162, in __init__
    Scientist.__init__(self, self.identifier, year, refresh)

  File "E:\Anaconda3\lib\site-packages\sosia\classes\scientist.py", line 210, in __init__
    self._name = ", ".join([au.surname, au.given_name])

TypeError: sequence item 0: expected str instance, NoneType found
Michael-E-Rose commented 5 years ago

But is this not what we want? Have an error, such that the user provides the correct ID? Or what kind if error-handling would you suggest?

ste210 commented 5 years ago

I thought, this should appear as a warning directly in sosia. But maybe is also more correct like this? ..in any case it is a minor issue

Michael-E-Rose commented 3 years ago

pybliometrics raises a warning in two cases:

Does that solve this issue?