mpx-cli icon indicating copy to clipboard operation
mpx-cli copied to clipboard

(node:14308) UnhandledPromiseRejectionWarning:

Open polizoto opened this issue 3 years ago • 2 comments

Hi:

I just tried calling the API using the mpx path/to/input.pdf path/to/output.docx method and received the following warning (5 times).

at Timeout.<anonymous> (C:\Users\USERNAME\AppData\Roaming\npm\node_modules\@mathpix\mpx-cli\lib\convert.js:258:22)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:14308) 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: 6)

I have attached the (single-page) PDF file in question.

Page 250.pdf

The Markdown and MS Word documents I requested are downloaded successfully, but what do you recommend?

polizoto avatar Sep 02 '21 19:09 polizoto

@polizoto thanks for the report, I'll look into this and reply back when there's a solution.

montanaflynn avatar Sep 03 '21 02:09 montanaflynn

Also in the meantime you should see the PDF at https://snip.mathpix.com/ where you can export to docx or any other format without re-processing the same pdf for each exported format.

montanaflynn avatar Sep 03 '21 02:09 montanaflynn