gautamdhameja / medium-2-md

A CLI tool that converts exported Medium posts (html) to Jekyll/Hugo compatible markdown with front matter.
https://www.npmjs.com/package/medium-2-md
Apache License 2.0
142 stars 19 forks source link

Error converting file #9

Closed djensen47 closed 3 years ago

djensen47 commented 4 years ago
Error converting file: 2016-06-03_Payette-Brewing--Idaho-Will-Be-Known-for-More-Than-Potatoes-9ac8792a37f5.html. Skipping.
internal/streams/legacy.js:59
      throw er; // Unhandled stream error in pipe.
      ^

Error: socket hang up
    at createHangUpError (_http_client.js:329:15)
    at TLSSocket.socketOnEnd (_http_client.js:421:23)
    at emitNone (events.js:110:20)
    at TLSSocket.emit (events.js:207:7)
    at endReadableNT (_stream_readable.js:1057:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

P.S. Thanks for making such a great tool!

djensen47 commented 4 years ago

Let me know if you need the html file.

I think it might be because I have 215 files and maybe something is getting rate limited? Would it be possible to slow down the process of pulling the images?

gautamdhameja commented 4 years ago

Sorry, just saw this.

@djensen47 Yeah, please share the html file for me to debug this. Thanks.

djensen47 commented 3 years ago

The issue here is not just one file. This happens when you have dozens of files with several images each. The call to Promise.all executes all of the promises at the same time. However, if I change it to be sequential, I do not get the error. I'll submit a PR for this change.