The code that you said is failing seems to be from the Seasons skin sensors.inc file (???) which gets its list of $sensor_voltages to report on from skin.conf, with a hardcoded fallback value in sensors.inc itself. Is it possible you are trying to look up a sensor that does not exist or that has recently failed or been undefined in skin.conf ?
(in Seasons skin.conf)
sensor_voltages = consBatteryVoltage, heatingVoltage, supplyVoltage, referenceVoltage
(in Seasons sensors.inc)
#set $sensor_voltages = $to_list($DisplayOptions.get('sensor_voltages', ['consBatteryVoltage', 'heatingVoltage', 'supplyVoltage', 'referenceVoltage']))
[...]
###### (to me, this says if there are 'any' readings in the last month from 'any' sensor)
#set $have_voltage = 0
#for $x in $sensor_voltages
#if $getattr($recent, $x).has_data
#set $have_voltage = 1
#end if
#end for
[...]
###### up above in the file it defines 'recent' as $recent=$span($day_delta=30, boundary='midnight')
#if $have_voltage
<tr><th>$gettext("Voltage")</th><th></th></tr>
#for $x in $sensor_voltages
#if $getattr($recent, $x).has_data
<tr>
<td class="label">$obs.label[$x]</td>
<td class="data">$getVar('current.' + $x)</td>
#set $lasttime = $getattr($recent, $x).lasttime.raw
<td class="timestamp">$get_time_delta($lasttime, $now)</td>
</tr>
#end if
#end for
#end if
I'd suggest trying to add some debugging print statements to see what's in there for each sensor (?)
#if $have_voltage
<tr><th>$gettext("Voltage")</th><th></th></tr>
#for $x in $sensor_voltages
#if $getattr($recent, $x).has_data
<tr>
<td class="label">$obs.label[$x]</td>
<td class="data">$getVar('current.' + $x)</td>
<td class="data">$getattr($recent, $x)</td>
</tr>
#end if
#end for
#end if