rss unable to unsubscribe

I have tried the code:
Run this in Tools → Developer → Run JavaScript to delete all feeds:

var feeds = Zotero.Feeds.getAll();
for (let feed of feeds) {
await feed.eraseTx({ deleteItems: true });
}

But the result shows:

SyntaxError: unexpected token: keyword 'this'
  • you can just wait a moment, about some minutes. It may take more than five minutes because RSS feeds can have too much information
  • I have tried several times,and it didn't work.
  • You shouldn't get that error with the above code. Are you sure that's what you're running?

    If you're sure, try disabling any plugins you're running.
  • I have tired the code four time, and there are two results. One is the mentioned above, and the second result is:

    Error: Cannot erase item in library 1-Risk Analysis Q1
  • edited November 9, 2022
    With all plugins disabled, can you delete the feed via the Zotero interface, not using code?

    If not, please provide a Debug ID for that. We can't help with anything you're doing via code.
  • I cannot open the plugins chatbox now. The debug ID is
    426477321
  • I have disabled all the plugins, and the feed still cannot be deleted. The Debug ID is

    1798612474
  • That's a Report ID, not a Debug ID.
  • OK. The Debug ID is D1871658331.
  • edited November 9, 2022
    (3)(+0000000): Deleting feedItem 4953

    (4)(+0000000): SELECT itemID FROM itemNotes WHERE parentItemID=?1 UNION SELECT itemID FROM itemAttachments WHERE parentItemID=?1 [4953]

    (1)(+0000009): Rolled back DB transaction yu54tSpp

    (1)(+0000000): Cannot erase item in library 4-C[…]
    It seems like you somehow added one or more attachments to one or more feed items, I'm guessing with a plugin. Do you happen to know how?

    Do you see the attachments in the items list? If so, you can select one and run this:

    await ZoteroPane.getSelectedItems()[0].eraseTx({ skipEditCheck: true })
  • 这段代码解决了这个问题,非常感谢你。
Sign In or Register to comment.