Project

General

Profile

Bug #4149

python objectListIterator.totalObjectCount() fails

Added by Dave Vieglais over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
d1_libclient_python
Target version:
-
Start date:
Due date:
% Done:

100%

Milestone:
CCI-0.6.1
Product Version:
*
Story Points:
Sprint:

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 over 10 years ago

  • Status changed from New to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)