libZotero
libZotero copied to clipboard
fetchCollections fails (fix included)
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
How should I submit a pull request with this change?