question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Translating. Please wait.(node:78632) UnhandledPromiseRejectionWarning: RequestError: read ETIMEDOUT at ClientRequest.<anonymous> (/Users/Eugene/node_modules/got/source/request-as-event-emitter.js:178:14) at Object.onceWrapper (events.js:520:26) at ClientRequest.emit (events.js:412:35) at ClientRequest.origin.emit (/Users/Eugene/node_modules/@szmarczak/http-timer/source/index.js:37:11) at TLSSocket.socketErrorListener (_http_client.js:475:9) at TLSSocket.emit (events.js:400:28) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) (Use node --trace-warnings ... to show where the warning was created) (node:78632) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:78632) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Aido21commented, Feb 22, 2022

just one idea - if you would show the number of lines that is translated already the user can be sure that the process is working and not stuck

On 22 Feb 2022, at 16:10, Parvin Eyvazov @.***> wrote:

Actually, it is normal for that big file. I translated 700 lines JSON file before, and it took 10 minutes. If there is no error, it will respond.

This package works in async format to make operations fast. That means if there are 5 fields in the object it tries to translate them at the same time. And when sending more than 1000+ requests at the same time to the Google Translate API, response times get longer (Google Translate API makes this latency.). At that time problem occurs on big files. Unfortunately, I can’t solve it right now (I don’t have much time nowadays) but there can be a way to solve it manually. You can do like this:

Please divide your JSON file into 3 or more pieces, translate them separately and merge it. For example: You have 1000 lines JSON file (a.json): Create valid JSON files:

a1.json (from a.json, take 0 to 250 lines) a2.json (from a.json, take 251 to 500 lines) a3.json (from a.json, take 501 to 750 lines) a4.json (from a.json, take 751 to 1000 lines) And translate them separately. (Don’t forget to change the name of the file which will be created each time. Because the new English file name will always be en.json).

Sorry for the problem. I am adding this problem to the roadmap to solve it when I am available.

— Reply to this email directly, view it on GitHub https://github.com/ParvinEyvazov/json-translator/issues/1#issuecomment-1047527733, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBNC523XDQLFNZIM6VHL3LU4NAIZANCNFSM5O5NNAFQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

1reaction
Aido21commented, Feb 22, 2022

Thanks

you don’t have to say sorry. )) Everything is ok and thanks a lot for your work.

On 22 Feb 2022, at 16:10, Parvin Eyvazov @.***> wrote:

Actually, it is normal for that big file. I translated 700 lines JSON file before, and it took 10 minutes. If there is no error, it will respond.

This package works in async format to make operations fast. That means if there are 5 fields in the object it tries to translate them at the same time. And when sending more than 1000+ requests at the same time to the Google Translate API, response times get longer (Google Translate API makes this latency.). At that time problem occurs on big files. Unfortunately, I can’t solve it right now (I don’t have much time nowadays) but there can be a way to solve it manually. You can do like this:

Please divide your JSON file into 3 or more pieces, translate them separately and merge it. For example: You have 1000 lines JSON file (a.json): Create valid JSON files:

a1.json (from a.json, take 0 to 250 lines) a2.json (from a.json, take 251 to 500 lines) a3.json (from a.json, take 501 to 750 lines) a4.json (from a.json, take 751 to 1000 lines) And translate them separately. (Don’t forget to change the name of the file which will be created each time. Because the new English file name will always be en.json).

Sorry for the problem. I am adding this problem to the roadmap to solve it when I am available.

— Reply to this email directly, view it on GitHub https://github.com/ParvinEyvazov/json-translator/issues/1#issuecomment-1047527733, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBNC523XDQLFNZIM6VHL3LU4NAIZANCNFSM5O5NNAFQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong Definition & Meaning - Merriam-Webster
1 of 3 noun. ˈrȯŋ. 1. : a harmful, unfair, or unjust act. 2. : something that is wrong : wrong principles, practices,...
Read more >
Wrong Definition & Meaning | Dictionary.com
not in accordance with what is morally right or good : a wrong deed. · deviating from truth or fact; erroneous: a wrong...
Read more >
WRONG | definition in the Cambridge English Dictionary
not suitable or desirable, or not as it should be : It was the wrong time to ask for a raise. She was...
Read more >
Wrong definition and meaning | Collins English Dictionary
wrong in American English ; 1. not in accordance with what is morally right or good. a wrong deed ; 2. deviating from...
Read more >
WHAT'S WRONG? (phrase) definition and synonyms
Definition of WHAT'S WRONG? (phrase): asking someone what problem they have; asking why machine etc is not working; asking someone why they do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found