Skip to content

fetchCollections fails (fix included) #9

Description

@chfritz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions