Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responds with "Internal Server Error" when trying google books search link with no results #32

Closed
mvolz opened this issue Aug 6, 2018 · 1 comment

Comments

@mvolz
Copy link
Contributor

mvolz commented Aug 6, 2018

This might not be appropriate to put here because it causes issues with translation-server as well, but the error should be handled because it causes the server to return "internal server error".

curl -d 'https://www.google.co.uk/search?tbm=bks&hl=en&q=isbn%253A0596554141' -H 'Content-Type: text/plain' http://127.0.0.1:1969/web

Internal Server Error

(3)(+0060254): HTTP GET https://www.google.co.uk/search?tbm=bks&hl=en&q=isbn%253A0596554141

(3)(+0000538): Translators: Looking for translators for https://www.google.co.uk/search?tbm=bks&hl=en&q=isbn%253A0596554141

(4)(+0000000): Translate: Binding sandbox to https://www.google.co.uk/search?tbm=bks&hl=en&q=isbn%253A0596554141

(4)(+0000001): Translate: Parsing code for Google Books (3e684d82-73a3-9a34-095f-19b112d88bbf, 2017-12-03 04:20:33)

(4)(+0000001): Translate: Parsing code for Library Catalog (InnoPAC) (4fd6b89b-2316-2dc4-fd87-61a97dd941e8, 2017-09-26 22:26:13)

(4)(+0000004): Translate: Parsing code for unAPI (e7e01cac-1e37-4da6-b078-a0e8343b0e98, 2018-05-12 15:58:17)

(4)(+0000001): Translate: Parsing code for COinS (05d07af9-105a-4572-99f6-a8e231c0daef, 2015-06-04 03:25:10)

(4)(+0000003): Translate: Parsing code for Embedded Metadata (951c027d-74ac-47d4-a107-9c3069ab7b48, 2018-07-01 18:02:27)

(3)(+0000003): Translate: Embedded Metadata: found 2 meta tags.

(4)(+0000000): Translate: Parsing code for DOI (c159dcfe-8a53-4301-a499-30f6549c340d, 2016-11-05 10:57:01)

(3)(+0000003): Translate: All translator detect calls and RPC calls complete:

(3)(+0000000): Google Books: 100

(5)(+0000000): Translate: Running handler 0 for translators

(5)(+0000000): Translate: Running handler 1 for translators

(4)(+0000000): Translate: Parsing code for Google Books (3e684d82-73a3-9a34-095f-19b112d88bbf, 2017-12-03 04:20:33)

(3)(+0000001): Translate: Beginning translation with Google Books

(3)(+0000032): Error: Translator called select items with no items

Error: Translator called select items with no items
    at Object.selectItems (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:541:11)
    at Object.selectItems (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:91:17)
    at doWeb (eval at <anonymous> (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:65:4), <anonymous>:75:10)
    at Zotero.Translate.Web.rest (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1389:49)
    at loadPromise.then (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1379:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

(2)(+0000000): Translate: Translation using Google Books failed:
Error: Translator called select items with no items

Error: Translator called select items with no items
at Object.selectItems (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:541:11)
at Object.selectItems (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:91:17)
at doWeb (eval at (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:65:4), :75:10)
at Zotero.Translate.Web.rest (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1389:49)
at loadPromise.then (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1379:39)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
url => https://www.google.co.uk/search?tbm=bks&hl=en&q=isbn%253A0596554141

(5)(+0000001): Translate: Running handler 0 for error

(1)(+0000000): Translation using Google Books failed

(1)(+0000000): Error: Translator called select items with no items

Error: Translator called select items with no items
    at Object.selectItems (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:541:11)
    at Object.selectItems (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:91:17)
    at doWeb (eval at <anonymous> (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:65:4), <anonymous>:75:10)
    at Zotero.Translate.Web.rest (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1389:49)
    at loadPromise.then (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1379:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

TypeError: Cannot read property 'documentElement' of undefined
at module.exports.SearchSession.saveWebpage (/home/marielle/Code/translation-server-v2/src/webSession.js:233:32)
at module.exports.SearchSession.translate (/home/marielle/Code/translation-server-v2/src/webSession.js:210:10)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

(3)(+0000236): HTTP GET https://www.google.co.uk/search?tbm=bks&hl=en&q=isbn%253A0596554141

(3)(+0000428): Translators: Looking for translators for https://www.google.co.uk/search?tbm=bks&hl=en&q=isbn%253A0596554141

(4)(+0000000): Translate: Binding sandbox to https://www.google.co.uk/search?tbm=bks&hl=en&q=isbn%253A0596554141

(4)(+0000001): Translate: Parsing code for Google Books (3e684d82-73a3-9a34-095f-19b112d88bbf, 2017-12-03 04:20:33)

(4)(+0000000): Translate: Parsing code for Library Catalog (InnoPAC) (4fd6b89b-2316-2dc4-fd87-61a97dd941e8, 2017-09-26 22:26:13)

(4)(+0000004): Translate: Parsing code for unAPI (e7e01cac-1e37-4da6-b078-a0e8343b0e98, 2018-05-12 15:58:17)

(4)(+0000001): Translate: Parsing code for COinS (05d07af9-105a-4572-99f6-a8e231c0daef, 2015-06-04 03:25:10)

(4)(+0000004): Translate: Parsing code for Embedded Metadata (951c027d-74ac-47d4-a107-9c3069ab7b48, 2018-07-01 18:02:27)

(3)(+0000003): Translate: Embedded Metadata: found 2 meta tags.

(4)(+0000000): Translate: Parsing code for DOI (c159dcfe-8a53-4301-a499-30f6549c340d, 2016-11-05 10:57:01)

(3)(+0000003): Translate: All translator detect calls and RPC calls complete:

(3)(+0000000): Google Books: 100

(5)(+0000000): Translate: Running handler 0 for translators

(5)(+0000001): Translate: Running handler 1 for translators

(4)(+0000000): Translate: Parsing code for Google Books (3e684d82-73a3-9a34-095f-19b112d88bbf, 2017-12-03 04:20:33)

(3)(+0000000): Translate: Beginning translation with Google Books

(3)(+0000026): Error: Translator called select items with no items

Error: Translator called select items with no items
    at Object.selectItems (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:541:11)
    at Object.selectItems (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:91:17)
    at doWeb (eval at <anonymous> (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:65:4), <anonymous>:75:10)
    at Zotero.Translate.Web.rest (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1389:49)
    at loadPromise.then (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1379:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

(2)(+0000000): Translate: Translation using Google Books failed:
Error: Translator called select items with no items

Error: Translator called select items with no items
at Object.selectItems (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:541:11)
at Object.selectItems (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:91:17)
at doWeb (eval at (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:65:4), :75:10)
at Zotero.Translate.Web.rest (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1389:49)
at loadPromise.then (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1379:39)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
url => https://www.google.co.uk/search?tbm=bks&hl=en&q=isbn%253A0596554141

(5)(+0000000): Translate: Running handler 0 for error

(1)(+0000000): Translation using Google Books failed

(1)(+0000000): Error: Translator called select items with no items

Error: Translator called select items with no items
    at Object.selectItems (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:541:11)
    at Object.selectItems (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:91:17)
    at doWeb (eval at <anonymous> (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:65:4), <anonymous>:75:10)
    at Zotero.Translate.Web.rest (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1389:49)
    at loadPromise.then (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1379:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

TypeError: Cannot read property 'documentElement' of undefined
at module.exports.SearchSession.saveWebpage (/home/marielle/Code/translation-server-v2/src/webSession.js:233:32)
at module.exports.SearchSession.translate (/home/marielle/Code/translation-server-v2/src/webSession.js:210:10)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

@mvolz mvolz changed the title Errors thrown with no search results from google books Responds with "Internal Server Error" when trying google books search link with no results Aug 6, 2018
@adomasven
Copy link
Member

This is just a translator issue, reported at zotero/translators#1706

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants