laurent22 / pmcam

Poor man's video capture with motion detection in Bash
38 stars 5 forks source link

./pmcam.sh: line 42: [: compare: unable to open image #2

Open chrstphrvllrn opened 4 years ago

chrstphrvllrn commented 4 years ago

Device: MAC OS Mojave I'm getting this error.

Capturing /Users/username/Downloads/Pentesting/Camera/pmcam/images/20200327T121407.jpg
./pmcam.sh: line 42: [: compare: unable to open image** '/Users/username/Downloads/Pentesting/Camera/pmcam/images/20200327T121406.jpg': No such file or directory @ error/blob.c/OpenBlob/3496.
compare: unable to open image** '/Users/username/Downloads/Pentesting/Camera/pmcam/images/20200327T121407.jpg': No such file or directory @ error/blob.c/OpenBlob/3496.
compare: unable to open image '/Users/username/Downloads/Pentesting/Camera/pmcam/images/20200327T121407.jpg': No such file or directory @ error/blob.c/OpenBlob/3496.: integer expression expected
Different image: keep (Diff = compare: unable to open image '/Users/username/Downloads/Pentesting/Camera/pmcam/images/20200327T121406.jpg': No such file or directory @ error/blob.c/OpenBlob/3496.
compare: unable to open image '/Users/username/Downloads/Pentesting/Camera/pmcam/images/20200327T121407.jpg': No such file or directory @ error/blob.c/OpenBlob/3496.
compare: unable to open image '/Users/username/Downloads/Pentesting/Camera/pmcam/images/20200327T121407.jpg': No such file or directory @ error/blob.c/OpenBlob/3496.)
form-follows-function commented 4 years ago

Despite using a folder called "Pentesting" this sounds like a permission error.

chrstphrvllrn commented 4 years ago

Permission like what?

it looks like it's trying to find the 20200327T121407.jpg which is not yet created.

Regards,

form-follows-function commented 4 years ago

it looks like it's trying to find the 20200327T121407.jpg which is not yet created.

Can you confirm this?

The first line suggest it is indeed trying to capture the image but fails at comparing.

Permission like what?

Folder and/or user/environment permissions. Which macOS version are you running?