__str__ not always working
Michael-E-Rose opened this issue · 1 comments
Michael-E-Rose commented
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:
- Find out which class-view combinations do not work
- For each, decide whether to provide fewer information in the
__str__
or skipt it altogether (i.e., returnNone
) - For each class where
__str__
will be shut off for at least one view, update the documentation
nils-herrmann commented
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 |