You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What were you trying to do: trying to get the total results for a query. had to fetch it from the HTTP response that is stored in the request property
What API call did it involve: search with q
What error was raised: no error, just bad naming
More Details
If possible, paste the full traceback in a code block below, and fill in the summary
Traceback
from pyzotero import zotero
zot = zotero.Zotero("xxxxxx", "group", "zzzzzzzz")
zot.items(q="something", start=0, limit=10)
# fetching the response header "Total-results" from a public
# property called "request"
total_results = zot.request.headers.get("Total-Results", 0)
print(total_results)
# is actually a
print(type(zot.request)
from pyzotero import zotero
zot = zotero.Zotero("xxxxxx", "group", "zzzzzzzz")
zot.items(q="something", start=0, limit=10)
# fetching the response header "Total-results" from a public
# property called "request"
total_results = zot.request.headers.get("Total-Results", 0)
print(total_results)
# is actually a <class 'requests.models.Response'>
print(type(zot.request))
Zotero.request should be named Zotero.response
The text was updated successfully, but these errors were encountered:
Platform: Darwin/arm64
Python version: 3.9.4
Pyzotero version: 1.5.1
Problem Description
More Details
If possible, paste the full traceback in a code block below, and fill in the summary
Traceback
from pyzotero import zotero zot = zotero.Zotero("xxxxxx", "group", "zzzzzzzz") zot.items(q="something", start=0, limit=10) # fetching the response header "Total-results" from a public # property called "request" total_results = zot.request.headers.get("Total-Results", 0) print(total_results) # is actually a print(type(zot.request)Zotero.request should be named Zotero.response
The text was updated successfully, but these errors were encountered: