Script Error Trapping?
Posted: 01 Mar 2019, 17:46
I've been running a script to control my allsky camera without trouble for many months. I recently started running a Python script that FTP's the saved images to a web site. Now, some random time during the night, I'll get a script error that halts the script. I suspect that Windows is involved. I tried running AstroArt as Administrator but that didn't help. Here's the partial code and output:
I'm wondering if there is a way to trap the error and take an alternative action? Likely, delay a second or two then retry. I'm running AstroArt 6 right now (have 7 but haven't loaded yet) and running in Windows 10.
Thanks, Rick
Code: Select all
ImgName$ = "sky"+ImgNum$+".jpg" ' sequenced filename
FilePath$ = AllpicsPath$+ImgName$ ' filename and path
print FilePath$
Image.SaveView(FilePath$)
pause(1)
FilePath$ = AllpicsPath$+"sky"+".jpg" ' static filename for FTP
print FilePath$
Image.SaveView(FilePath$)
835,2019 02 27,03 07 41,133.09,30,2917,2147
sky0835.fit
C:\Allsky\AllskyPics\sky0835.jpg
C:\Allsky\AllskyPics\sky.jpg
836,2019 02 27,03 08 16,132.97,30,2945,2166
sky0836.fit
C:\Allsky\AllskyPics\sky0836.jpg
C:\Allsky\AllskyPics\sky.jpg
837,2019 02 27,03 08 52,132.86,30,2928,2179
sky0837.fit
C:\Allsky\AllskyPics\sky0837.jpg
C:\Allsky\AllskyPics\sky.jpg
Cannot save image. Check path and filename - Line 269
Thanks, Rick