OK i find the error. Your track is open track and the script can't handle. Close your track and run the script then later remove the segment in splines but remember to close to surface modifiers to works. Check normalize.. to 25m maybe.
Thanks Mario, I think I understand now where I went wrong. I did took spline/path selection in sasplanet and made path for whole track, but that seems to make tiles for whole area covered by track, instead of just track path, so I computer will run out of memory. Doing it in pieces like you do will probably cure that one, also I can put on screen only tiles that I need so that I can save memory, it is most likely over 2GB that Partaharju track requires to have full map, so doing it in parts might help performance quite a bit for me. For me your script looks like to be magic, somehow it just knows where to put those tiles and even at correct size, incredible it is. Good thing with SAS Planet is that I can take tiles from Nokia DG Satellite as source too as Google Earth is useless on Partaharju area, but Nokia satellite images are usable, not perfect, but usable. Only thing is that I end up with tiles bit larger, 1124x1011, but it seemed not to cause any issues at least not on few parts I had time to test.