axipo / pdfTranslator

一个具有划词翻译功能的跨平台pdf阅读器,用着挺好用开源一下造福众科研人员,欢迎star
https://pdf.hakso.net
744 stars 84 forks source link

ERROR #9

Open LIkensust opened 3 years ago

LIkensust commented 3 years ago

似乎是翻译API失效了. 在不同的机器和网络下都出现这个ERROR.

(node:39966) UnhandledPromiseRejectionWarning: Error at getError (/Users/keene/terminalApplication/pdfTranslator/pdfTranslator/node_modules/translation.js/dist/tjs.node.common.js:83:13) at ClientRequest. (/Users/keene/terminalApplication/pdfTranslator/pdfTranslator/node_modules/translation.js/dist/tjs.node.common.js:124:24) at Object.onceWrapper (events.js:421:26) at ClientRequest.emit (events.js:314:20) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:640:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17) at TLSSocket.socketOnData (_http_client.js:509:22) at TLSSocket.emit (events.js:314:20) at addChunk (_stream_readable.js:303:12) at readableAddChunk (_stream_readable.js:279:9)

ysl2 commented 2 years ago

+1

xuxiaowei088 commented 2 years ago

不知道为什么在linux中打开之后,出现

at ClientRequest. (/home/xuxiaowei/github/pdfTranslator/pdfTranslator/node_modules/translation.js/dist/tjs.node.common.js:124:24) at Object.onceWrapper (node:events:642:26) at ClientRequest.emit (node:events:527:28) at HTTPParser.parserOnIncomingClient (node:_http_client:631:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17) at TLSSocket.socketOnData (node:_http_client:494:22) at TLSSocket.emit (node:events:527:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) { code: 'API_SERVER_ERROR' } 不知道如何进行修改

LIkensust commented 2 years ago

不知道为什么在linux中打开之后,出现

at ClientRequest. (/home/xuxiaowei/github/pdfTranslator/pdfTranslator/node_modules/translation.js/dist/tjs.node.common.js:124:24) at Object.onceWrapper (node:events:642:26) at ClientRequest.emit (node:events:527:28) at HTTPParser.parserOnIncomingClient (node:_http_client:631:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17) at TLSSocket.socketOnData (node:_http_client:494:22) at TLSSocket.emit (node:events:527:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) { code: 'API_SERVER_ERROR' } 不知道如何进行修改

用这个吧 https://github.com/LIkensust/copy_then_translate