Changing GUI node at init breaking timer

In my init of my GUI script I want to change a text node. This breaks a timer I have in my main.script that is in charge of dispatching actions.
ERROR:SCRIPT: /main/main.script:30: attempt to perform arithmetic on field ‘startTime’ (a nil value)
stack traceback:
/main/main.script:30: in function </main/main.script:27>
Here is the relevant timer code:

Main.script

    function init(self)
    	self.startTime = socket.gettime()
    end
  function update(self, dt)
    	local time = socket.gettime()
    	if time - self.startTime > 1 then
    		self.startTime = time
    		--do something
    	end
    end

There’s nothing obviously wrong with the code you posted. Can you post the script in it’s entirety or at least post what’s on line #30?