Bug #4149
python objectListIterator.totalObjectCount() fails
100%
Description
Current release of dataone.libclient ObjectListIterator fails when calling totalObjectCount()
d1_client.version
Out[37]: '1.2.2'
e.g.:
from d1_client import d1client
baseurl="https://knb.ecoinformatics.org/knb/d1/mn"
mn = d1client.DataONEClient(baseurl)
ol = mn.listObjects(count=0)
ol.totalObjectCount()¶
AttributeError Traceback (most recent call last)
in ()
----> 1 ol.totalObjectCount()
/Library/Python/2.7/site-packages/d1_client/objectlistiterator.pyc in totalObjectCount(self)
144 '''Returns the total number of objects in the
145 '''
--> 146 return self._objectlist.total
147
148
AttributeError: 'ObjectListIterator' object has no attribute '_objectlist'
There is however, an attribute called _objectList
History
#1 Updated by Roger Dahl about 11 years ago
- Status changed from New to Closed