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

Doesn't work with await #46

Open
strarsis opened this issue Jul 6, 2019 · 5 comments
Open

Doesn't work with await #46

strarsis opened this issue Jul 6, 2019 · 5 comments

Comments

@strarsis
Copy link

strarsis commented Jul 6, 2019

@z-vr:

const exiftool = require('node-exiftool'),
      ep       = new exiftool.ExiftoolProcess(),

async function test(inputPath) {
    await ep.open();

    try {
        const result = await ep.readMetadata(
            inputPath,
            ['-File:all -dateFormat %Y-%m-%dT%H:%M:%S -datetimeoriginal']
        );
        console.log(result);
    } catch(e) {
        console.error(e);
    }

    await ep.close();
}

test('./test.jpg');

Error:

UnhandledPromiseRejectionWarning: Error: Exiftool process is not open
@dminkovsky
Copy link

Seems to work for me.

@danielzotti
Copy link

It works for me too (node v14.12.0)

@strarsis
Copy link
Author

strarsis commented Jan 17, 2021

Maybe it is the node version? I would have to retest it with a recent node LTS.

@ElisonSz
Copy link

ElisonSz commented Jun 3, 2022

It works for me ✅

@anasshakil
Copy link

Please take a look at my repo. I hope it'll solve your problem
Link: https://github.com/anasshakil/metadata

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

5 participants