pybliometrics-dev / pybliometrics

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

Scopus Api Error #54

Closed Stawliner closed 6 years ago

Stawliner commented 6 years ago

Dear Michael-E-Rose, dear programmers,

I am using your Scopus Api and I like several aspects of it. But when I create an instance of the class "ScopusAbstract(object)" (in scopus_api.py), inserting an EID like "2-s2.0-63449122615" as string object, I get the error "NoneType object has no attribute 'find'". The specific problem is in line 244, which is

self.scopus_link = coredata.find('link[@rel="scopus"]', ns).get('href')

Would you be so kind and help me? I really need this for my study course.

Here is an example call:

from scopus.scopus_api import ScopusAbstract
from scopus.scopus_search import ScopusSearch

query_str = "This paper presents a new approach to select events of interest to users in a social"
query = ScopusSearch("ABS({})".format(query_str), refresh=False)
id = query.EIDS[0]
ab = ScopusAbstract(id)

-> Error "NoneType object has no attribute 'find'" in line 244 of scopus_api.py

Thank you.

Kind regards

Stefan Wilharm

Michael-E-Rose commented 6 years ago

Hi Stefan! Which version are you on? Check with

import scopus
print(scopus.__version__)
Stawliner commented 6 years ago

Hi! My version is 0.3.1. I already tried to update via "pip install scopus", but it says "Req. already satisfied".

Michael-E-Rose commented 6 years ago

You need to update with the --upgrade flag.

Stawliner commented 6 years ago

Ah now it works! It is great you made an update. Thank you so much for your fast help!

Michael-E-Rose commented 6 years ago

You're very welcome!

Stawliner commented 6 years ago

Thank you! I left you a star. Have a good time!