Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

npm module: imread with relative file path #455

Open
dangerdak opened this issue Mar 29, 2018 · 1 comment
Open

npm module: imread with relative file path #455

dangerdak opened this issue Mar 29, 2018 · 1 comment

Comments

@dangerdak
Copy link
Contributor

Passing a relative path to imread results in the error:

/.../test-propel/node_modules/propel/propel.js:10560
        throw error;
        ^

Error: ENOENT: no such file or directory, open '/Users/rld/src/propel/sample.png'
    at Object.fs.openSync (fs.js:667:18)
    at fs.readFileSync (fs.js:572:33)
    at fetch2 (/.../node_modules/propel/propel.js:10689:20)
    at Object.fetchBuffer (/.../node_modules/propel/propel.js:10745:18)
    at nodeImageDecoder (/.../node_modules/propel/propel.js:27853:31)
    at Object.imread (/.../node_modules/propel/propel.js:27875:22)
    at run (/.../test-propel/run-model.js:36:22)
    at <anonymous>

shell returned 1

Possibly because the npm module still has the line: var __dirname = "/Users/rld/src/propel/src"; (in v3.3.1)?

@qti3e
Copy link
Collaborator

qti3e commented Mar 29, 2018

To resolve #375, Ryan implemented a new function at 9116ff2 (fetchWithCache) and we need to use this new function in im.ts instead of directly calling fetch function (util.ts).

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

No branches or pull requests

2 participants