Dominic-DallOsto / zotero-api-endpoint

Provides an HTTP server endpoint for interacting with Zotero
22 stars 4 forks source link

The addon is disabled in Zotero 7 #20

Open dwellexity opened 1 week ago

dwellexity commented 1 week ago

The addon is disabled in Zotero 7, apparently due to compatibility issues. There is a pull request which claims to add compatibility for Zotero 7.

Dominic-DallOsto commented 1 week ago

Hey, sorry about this - I lost track a bit and didn't get around to updating this for Zotero 7 yet. I'll do it soon!

Dominic-DallOsto commented 1 week ago

If you have the chance, can you check the new version of the extension in #21 ?

dwellexity commented 1 week ago

If you have the chance, can you check the new version of the extension in #21 ?

Thank you for taking the time to update it. I tested it and I don't think it works. I used the following script and it simply freezes on Zotero 7. It works with Zotero 6.

import requests
import json

query_doi = "10.1038/s41586-022-05592-2"
data = {
    "libraryID": 1,
    "query": {
        "DOI": ["contains", query_doi],
        "joinMode": "any"
    },
    "resultType": "items"
}

data_json = json.dumps(data)
headers = {
    "Content-Type": "application/json; charset=utf-8"
}

url = "http://127.0.0.1:23119/zotero-api-endpoint/library/search"
try:
    response = requests.post(url, data=data_json, headers=headers)
    if response.status_code == 200:
        print(response.text)  
    else:
        print(f"Error: Received status code {response.status_code}")
except requests.RequestException as e:
    print(f"Error: Zotero is probably not running. Details: {e}")
Dominic-DallOsto commented 1 week ago

Ok, thanks for letting me know! I was hoping that everything would magically keep working but I guess not.

I'll let you know when I'm done debugging it