urschrei / pyzotero

Pyzotero: a Python client for the Zotero API
https://pyzotero.readthedocs.org
Other
908 stars 99 forks source link

Deleting a note #145

Closed Michael-N-N closed 3 years ago

Michael-N-N commented 3 years ago

Hi

I’m trying to delete a note:

  item = zotero.item(log['key'])
  resp = zotero.delete_item([item])

However, I always get an error that the library has been modified since the specified version (expected 24024, found 30031). I don’t understand what I have to do here because I already retrieved the item immediately before the delete command? Any help is highly appreciated.

urschrei commented 3 years ago

I can't reproduce this. This is an error that occurs if you modify the library in between API calls. Are you sure that you aren't adding items using the client or elsewhere?

Michael-N-N commented 3 years ago

Thanks for the response. I'm quite busy at work this week. It will check it and come back to the issue next weekend.

Michael-N-N commented 3 years ago

Sorry for the late answer. I'm still not sure what is wrong with my code but I think I tricked myself by using a class which might trigger some API calls. Thanks anyway.