Handling "No items returned" error in web translator.

44 views
Skip to first unread message

QQ T

unread,
Feb 1, 2024, 1:02:45 PMFeb 1
to zotero-dev
I'm writing a translator in Scaffold for  CNKI Scholar. Here's what I'm going to do:

Use search translator scraping information first, and if there is any error during the search translator running, I will catch the error and get the item's field from webpage elements.

However, the error "No items returned from any translator" seems to be a bit odd. My code can enter the "catch" statement, but no item return after calling complete(). Conversely, if I throw error manually at the start of the try statement, the code enters the catch statement and returns item.
I can't find anny case of handling this error in an existing translator.

QQ T (jiaojiaodubai)

unread,
Feb 2, 2024, 10:11:02 AMFeb 2
to zotero-dev
Later, I found a solution in Google Scholar.js, thanks to Zoe for the idea.
Reply all
Reply to author
Forward
0 new messages