libZotero icon indicating copy to clipboard operation
libZotero copied to clipboard

fetchCollections fails (fix included)

Open chfritz opened this issue 11 years ago • 1 comments

The following code fails, due to a bug in fetchCollections:

zlib = zotero.Library('user', userID, username, apiKey) cols = zlib.fetchCollections()

The error is: File "libZotero/lib/py/libZotero/collection.py", line 26, in init self.numCollections = entryNode.getElementsByTagName('http://zotero.org/ns/api', 'numCollections').item(0).childNodes.item(0).nodeValue

I believe the following is a valid fix in collection.py:

self.numCollections = entryNode.getElementsByTagName('http://zotero.org/ns/api', 'numCollections').item(0).childNodes.item(0).nodeValue -> self.numCollections = entryNode.getElementsByTagNameNS('http://zotero.org/ns/api', 'numCollections').item(0).childNodes.item(0).nodeValue

chfritz avatar Jun 03 '13 00:06 chfritz

How should I submit a pull request with this change?

kylesezhi avatar Mar 25 '16 07:03 kylesezhi