Open ManjitBedi opened 5 years ago
Please disregard my previous comment. It could be a timeout issue.
@ManjitBedi I would explore the options in https.get
:
https://nodejs.org/api/https.html#https_https_get_options_callback
Could you try editing the code in downloadModels.js to add a longer timeout based on that documentation?
Sure. I will try that. thanks
I tried a few ways to set an option for a timeout but the code will crash at run-time. I am quite new to programming with node & Promises.
function getFile(url) {
console.log('downloading file at ' + url);
return new Promise((resolve) => {
https.get(url, {timeout: 5000}, (res) => {
resolve(res);
});
});
}
Same issue here, yarn still fails at downloading models
$ node downloadModels.js downloading file at https://storage.googleapis.com/tfjs-models/weights/posenet/mobilenet_v1_101/manifest.json downloading file at https://storage.googleapis.com/tfjs-models/weights/posenet/mobilenet_v1_100/manifest.json downloading file at https://storage.googleapis.com/tfjs-models/weights/posenet/mobilenet_v1_075/manifest.json downloading file at https://storage.googleapis.com/tfjs-models/weights/posenet/mobilenet_v1_050/manifest.json events.js:287 throw er; // Unhandled 'error' event ^
Error: incorrect header check at Zlib.zlibOnError [as onerror] (zlib.js:180:17) Emitted 'error' event on Gunzip instance at: at errorOrDestroy (internal/streams/destroy.js:108:12) at Gunzip.onerror (_stream_readable.js:729:7) at Gunzip.emit (events.js:310:20) at Zlib.zlibOnError [as onerror] (zlib.js:183:8) { errno: -3, code: 'Z_DATA_ERROR' } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@shiningbroccoli thanks for your interest in using this! I'm working on a v2. work paused for a while but I'm back on it - and this issue will be fixed in v2.
Problem still exists. Is it therefore not possible to use this at all?
When running the download models script, it will always fail; but not always on the same file.
It appears to be a timeout issue?
And here the contents of the log file: