Closed Michael-E-Rose closed 6 months ago
There are 4 class-view combinations that trow an error:
nr | class | view | query | error_description |
---|---|---|---|---|
1 | AbstractRetrieval | META | scopus_object = AbstractRetrieval('S092427162100068X', view="META") | '@id' |
2 | AbstractRetrieval | REF | scopus_object = AbstractRetrieval('S092427162100068X', view="REF") | 'NoneType' object is not subscriptable |
3 | AuthorRetrieval | LIGHT | scopus_object = AuthorRetrieval('7004212771', view="LIGHT") | 'NoneType' object is not subscriptable |
4 | AuthorRetrieval | METRICS | scopus_object = AuthorRetrieval('7004212771', view="METRICS") | 'NoneType' object is not subscriptable |
The str dunder for each class prints out some basic information. However, depending on the view, not all information is present, resulting in an ugly Exception.
For example
print(str(AbstractRetrieval("2-s2.0-85166620539", view="META")))
doesn't work.Some tasks:
__str__
or skipt it altogether (i.e., returnNone
)__str__
will be shut off for at least one view, update the documentation