AllskyTeam / allsky

A Raspberry Pi operated Wireless Allsky Camera
MIT License
1.19k stars 180 forks source link

i don't understand this error message in startrails.cpp #728

Closed hoetzgit closed 3 years ago

hoetzgit commented 3 years ago

i don't understand this error message in startrails.cpp:

endOfNight.sh: ===== Generating Startrails Output file '/mnt/qnap01/Daten/allskycam01/images/20211024/startrails/startrails-20211024.jpg' is missing extension (.jpg or .png)

Usage: startrails [-v] -d

-e [-b -o | -S] [-s ] [-Q ] [-q ] Source directory and file extension are always required. brightness threshold and output file are required to render startrails

Arguments: -h | --help : display this help, then exit -v | --verbose : increase log verbosity -S | --statistics : print image directory statistics without producing image. -d | --directory : directory from which to read images -e | --extension : filter images to just this extension -Q | --max-threads : limit maximum number of processing threads. (unspecified = use all cpus) -q | --nice : nice(2) level of processing threads (10) -o | --output-file : output image filename -s | --image-size x : restrict processed images to this size -b | --brightness-limit : ranges from 0 (black) to 1 (white). Default 0.35 A moonless sky may be as low as 0.05 while full moon can be as high as 0.4

ex: startrails -b 0.07 -d ../images/20180208/ -e jpg -o startrails.jpg Command Failed: /home/pi/allsky01/startrails -d /mnt/qnap01/Daten/allskycam01/images/20211024 -e jpg -b 0.4 -o /mnt/qnap01/Daten/allskycam01/images/20211024/startrails/startrails-20211024.jpg

Apennine2 commented 3 years ago

Hello,

I would like to report I am having this same error since installing V0.8.1 yesterday. It occurs if running "end of nighttime", or manually :

pi@raspberrypi:~/allsky $ ./startrails -d ./images/20211024/ -e jpg -b 1.0 -o ./images/20211024/startrails/startrails.jpg Output file './images/20211024/startrails/startrails.jpg' is missing extension (.jpg or .png)

Usage: startrails [-v] -d

-e [-b -o | -S] [-s ] [-Q ] [-q ] Source directory and file extension are always required. brightness threshold and output file are required to render startrails

Arguments: -h | --help : display this help, then exit -v | --verbose : increase log verbosity -S | --statistics : print image directory statistics without producing image. -d | --directory : directory from which to read images -e | --extension : filter images to just this extension -Q | --max-threads : limit maximum number of processing threads. (unspecified = use all cpus) -q | --nice : nice(2) level of processing threads (10) -o | --output-file : output image filename -s | --image-size x : restrict processed images to this size -b | --brightness-limit : ranges from 0 (black) to 1 (white). Default 0.35 A moonless sky may be as low as 0.05 while full moon can be as high as 0.4

ex: startrails -b 0.07 -d ../images/20180208/ -e jpg -o startrails.jpg

linuxkidd commented 3 years ago

Hi, sorry ... there's a logic flaw in the extension check code. I'm pushing a PR to fix it now.

linuxkidd commented 3 years ago

The PR will resolve the issue, but only once it's merged. If you'd like to fix it locally before, you can:

  1. While logged in as the pi user ( or whatever user you installed allsky to, run:
    cd ~/allsky
    sed -i -e '332,332{s;||$;\&\&;}' src/startrails.cpp
    make -C src all
    make -C src install

    NOTE: The sed line replaces the || at the end of line 332 in src/startrails.cpp with &&. You're welcome to use your favorite text editor to make this change if you prefer.

  2. Retry startrails generation.

Once this is patched in the repository, a future git pull will complain about local changes. To get around this, you'll issue:

git checkout -- src/startrails.cpp
git pull

Thanks, and sorry for the bug...

linuxkidd commented 3 years ago

Hi all, Thanks to @ckuethe for the quick review and merge. You can now simply do the git pull and the make command from above to receive and compile the patched code.

Do feel free to re-open this issue if needed and/or just comment to confirm that this resolved the issue.

Apennine2 commented 3 years ago

Thank you, that did the trick!