Hello everybody, I use the Google Calendar skin with the adapted LUA script updated on the 2023-06-21. This one worked but since a few days, the script return on the line 1,235 (for my script) the error:
Reader.lua
attempt to compare nil with number
So, I inserted two print() function for debug before the comparison condition on the line 1235:Here the debug log when the issue occurs, my added debug lines are in italic:
DBUG (16:35:47.935) : @@@@@@ I'm in ComputeNextEvent(rrule, dtstart) function @@@@@
DBUG (16:35:47.936) : debug 777 ! -- Display all parameters of rrule --
DBUG (16:35:47.936) : debug 778 ! -- FREQ: MONTHLY
DBUG (16:35:47.936) : debug 779 ! -- INTERVAL: nil
DBUG (16:35:47.936) : debug 780 ! -- COUNT: nil
DBUG (16:35:47.937) : debug 781 ! -- BYDAY: -1WE
DBUG (16:35:47.937) : debug 782 ! -- BYMONTH: nil
DBUG (16:35:47.937) : debug 783 ! -- BYMONTHDAY: nil
DBUG (16:35:47.937) : debug 784 ! -- BYYEARDAY: nil
DBUG (16:35:47.938) : debug 785 ! -- BYWEEKNO: nil
DBUG (16:35:47.938) : debug 786 ! -- UNTIL: nil
DBUG (16:35:47.938) : debug 787 ! -- BYSETPOS: nil
DBUG (16:35:47.938) : ***************** MONTHLY EVENT *********************
DBUG (16:35:47.939) : debug 1069 : BYDAY on Monthly event args : -1WE
DBUG (16:35:47.939) : debug 1110 : args(1): -1WE
DBUG (16:35:47.939) : debug 1112 : Total arguments: 1
DBUG (16:35:47.939) : debug 1132 ! DTStartcurrentYear : 2023 DTStartcurrentMonth : 11 currentYear : 2023 currentMonth : 11
DBUG (16:35:47.940) : debug 1164 Wed Nov 29 11:00:00 2023
DBUG (16:35:47.940) : debug 1150 ! beginning while loop ! DTStartcurrentYear : 2023 StartcurrentMonth : 11 currentYear : 2023 currentMonth : 11
DBUG (16:35:47.940) : debug 1228 -- targetNth day in range of month-- : abs(targetNth) <= countday --- CHECK 4
DBUG (16:35:47.940) : Compare nextEvent: 1703674800
DBUG (16:35:47.940) : To os.time: 1704036947
DBUG (16:35:47.941) : debug 1236 ---go to next month interval -- date is in the past
DBUG (16:35:47.941) : debug 1237 ---startdate : Wed Nov 29 11:00:00 2023 nextEvent : Wed Dec 27 12:00:00 2023 --- loop --- : 1
DBUG (16:35:47.941) : debug 1270 ---startdate : Wed Nov 29 11:00:00 2023 nextEvent without time correction : Wed Dec 27 12:00:00 2023 nextEvent3 with time correction : Wed Dec 27 11:00:00 2023 --- loop -END-- : 1
DBUG (16:35:47.942) : debug 1150 ! beginning while loop ! DTStartcurrentYear : 2023 StartcurrentMonth : 11 currentYear : 2023 currentMonth : 12
DBUG (16:35:47.942) : debug 1223 -- targetNth day out range of month-- : abs(targetNth) > countday --- CHECK 3
DBUG (16:35:47.942) : Compare nextEvent: nil
DBUG (16:35:47.942) : To os.time: 1704036947
ERRO (16:35:47.943) : Script: Reader.lua
attempt to compare nil with number
It seems that the issue appears on a loop. I don't know about LUA, but I can make changes in the script if someone have thoughts about this issue. Sorry for my basic English, it's not my native language.
Reader.lua
So, I inserted two print() function for debug before the comparison condition on the line 1235:
Code:
if nextEvent < os.time() then
DBUG (16:35:47.935) : @@@@@@ I'm in ComputeNextEvent(rrule, dtstart) function @@@@@
DBUG (16:35:47.936) : debug 777 ! -- Display all parameters of rrule --
DBUG (16:35:47.936) : debug 778 ! -- FREQ: MONTHLY
DBUG (16:35:47.936) : debug 779 ! -- INTERVAL: nil
DBUG (16:35:47.936) : debug 780 ! -- COUNT: nil
DBUG (16:35:47.937) : debug 781 ! -- BYDAY: -1WE
DBUG (16:35:47.937) : debug 782 ! -- BYMONTH: nil
DBUG (16:35:47.937) : debug 783 ! -- BYMONTHDAY: nil
DBUG (16:35:47.937) : debug 784 ! -- BYYEARDAY: nil
DBUG (16:35:47.938) : debug 785 ! -- BYWEEKNO: nil
DBUG (16:35:47.938) : debug 786 ! -- UNTIL: nil
DBUG (16:35:47.938) : debug 787 ! -- BYSETPOS: nil
DBUG (16:35:47.938) : ***************** MONTHLY EVENT *********************
DBUG (16:35:47.939) : debug 1069 : BYDAY on Monthly event args : -1WE
DBUG (16:35:47.939) : debug 1110 : args(1): -1WE
DBUG (16:35:47.939) : debug 1112 : Total arguments: 1
DBUG (16:35:47.939) : debug 1132 ! DTStartcurrentYear : 2023 DTStartcurrentMonth : 11 currentYear : 2023 currentMonth : 11
DBUG (16:35:47.940) : debug 1164 Wed Nov 29 11:00:00 2023
DBUG (16:35:47.940) : debug 1150 ! beginning while loop ! DTStartcurrentYear : 2023 StartcurrentMonth : 11 currentYear : 2023 currentMonth : 11
DBUG (16:35:47.940) : debug 1228 -- targetNth day in range of month-- : abs(targetNth) <= countday --- CHECK 4
DBUG (16:35:47.940) : Compare nextEvent: 1703674800
DBUG (16:35:47.940) : To os.time: 1704036947
DBUG (16:35:47.941) : debug 1236 ---go to next month interval -- date is in the past
DBUG (16:35:47.941) : debug 1237 ---startdate : Wed Nov 29 11:00:00 2023 nextEvent : Wed Dec 27 12:00:00 2023 --- loop --- : 1
DBUG (16:35:47.941) : debug 1270 ---startdate : Wed Nov 29 11:00:00 2023 nextEvent without time correction : Wed Dec 27 12:00:00 2023 nextEvent3 with time correction : Wed Dec 27 11:00:00 2023 --- loop -END-- : 1
DBUG (16:35:47.942) : debug 1150 ! beginning while loop ! DTStartcurrentYear : 2023 StartcurrentMonth : 11 currentYear : 2023 currentMonth : 12
DBUG (16:35:47.942) : debug 1223 -- targetNth day out range of month-- : abs(targetNth) > countday --- CHECK 3
DBUG (16:35:47.942) : Compare nextEvent: nil
DBUG (16:35:47.942) : To os.time: 1704036947
ERRO (16:35:47.943) : Script: Reader.lua
It seems that the issue appears on a loop. I don't know about LUA, but I can make changes in the script if someone have thoughts about this issue. Sorry for my basic English, it's not my native language.
Statistics: Posted by Jean-Michel — Yesterday, 3:57 pm