Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn download-models fails #9

Open
ManjitBedi opened this issue Nov 8, 2018 · 7 comments
Open

yarn download-models fails #9

ManjitBedi opened this issue Nov 8, 2018 · 7 comments

Comments

@ManjitBedi
Copy link

When running the download models script, it will always fail; but not always on the same file.

yarn download-models

It appears to be a timeout issue?

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: connect ETIMEDOUT 172.217.14.240:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] download-models: `node downloadModels.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] download-models script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manjitbedi/.npm/_logs/2018-11-08T22_39_22_518Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

And here the contents of the log file:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/manjitbedi/.nvm/versions/node/v8.12.0/bin/node',
1 verbose cli   '/Users/manjitbedi/.nvm/versions/node/v8.12.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'download-models' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predownload-models',
4 verbose run-script   'download-models',
4 verbose run-script   'postdownload-models' ]
5 info lifecycle [email protected]~predownload-models: [email protected]
6 info lifecycle [email protected]~download-models: [email protected]
7 warn lifecycle The node binary used for scripts is /var/folders/5w/trwhrx8171v14gk9l1xhjt4r0000gn/T/yarn--1541716752743-0.8445708776113601/node but npm is using /Users/manjitbedi/.nvm/versions/node/v8.12.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
8 verbose lifecycle [email protected]~download-models: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~download-models: PATH: /Users/manjitbedi/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/manjitbedi/Projects/Work/onData/Reference etc./Node.js/posenet-for-installations-master/client/node_modules/.bin:/var/folders/5w/trwhrx8171v14gk9l1xhjt4r0000gn/T/yarn--1541716752743-0.8445708776113601:/Users/manjitbedi/Projects/Work/onData/Reference etc./Node.js/posenet-for-installations-master/node_modules/.bin:/Users/manjitbedi/.config/yarn/link/node_modules/.bin:/Users/manjitbedi/Projects/Work/onData/Reference etc./Node.js/posenet-for-installations-master/node_modules/.bin:/Users/manjitbedi/.config/yarn/link/node_modules/.bin:/Users/manjitbedi/.nvm/versions/node/v8.12.0/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/manjitbedi/.nvm/versions/node/v8.12.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/manjitbedi/.nvm/versions/node/v8.12.0/bin/node_modules/npm/bin/node-gyp-bin:/Users/manjitbedi/.nvm/versions/node/v8.12.0/bin:/Users/Shared/anaconda3/bin:/Users/manjitbedi/.cargo/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Developer/Marmalade/6.2/s3e/bin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin
10 verbose lifecycle [email protected]~download-models: CWD: /Users/manjitbedi/Projects/Work/onData/Reference etc./Node.js/posenet-for-installations-master/client
11 silly lifecycle [email protected]~download-models: Args: [ '-c', 'node downloadModels.js' ]
12 silly lifecycle [email protected]~download-models: Returned: code: 1  signal: null
13 info lifecycle [email protected]~download-models: Failed to exec download-models script
14 verbose stack Error: [email protected] download-models: `node downloadModels.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/Users/manjitbedi/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
14 verbose stack     at emitTwo (events.js:126:13)
14 verbose stack     at EventEmitter.emit (events.js:214:7)
14 verbose stack     at ChildProcess.<anonymous> (/Users/manjitbedi/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
14 verbose stack     at emitTwo (events.js:126:13)
14 verbose stack     at ChildProcess.emit (events.js:214:7)
14 verbose stack     at maybeClose (internal/child_process.js:915:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/manjitbedi/Projects/Work/onData/Reference etc./Node.js/posenet-for-installations-master/client
17 verbose Darwin 18.2.0
18 verbose argv "/Users/manjitbedi/.nvm/versions/node/v8.12.0/bin/node" "/Users/manjitbedi/.nvm/versions/node/v8.12.0/bin/npm" "run" "download-models"
19 verbose node v8.12.0
20 verbose npm  v6.4.1
21 error code ELIFECYCLE
22 error errno 1
23 error [email protected] download-models: `node downloadModels.js`
23 error Exit status 1
24 error Failed at the [email protected] download-models script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
/Users/manjitbedi/.npm/_logs/2018-11-08T22_39_22_518Z-debug.log (END)
@oveddan
Copy link
Owner

oveddan commented Nov 8, 2018

Please disregard my previous comment. It could be a timeout issue.

@ManjitBedi ManjitBedi changed the title yarn downloaad-models fails yarn download-models fails Nov 8, 2018
@oveddan
Copy link
Owner

oveddan commented Nov 8, 2018

@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?

@ManjitBedi
Copy link
Author

Sure. I will try that. thanks

@ManjitBedi
Copy link
Author

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);
    });
  });
}

@ghost
Copy link

ghost commented Apr 27, 2020

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.

@oveddan
Copy link
Owner

oveddan commented Apr 27, 2020

@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.

@jsynnott
Copy link

Problem still exists. Is it therefore not possible to use this at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants