2014-09-06, 14:46
Hi all,
I'm having a problem with the python, I'm running the code as it works fine without have any problem. When I close the skin window to return to the main menu and when I reopen them to run the code again, I will get an error to something like this:
The error are jumping on this line:
Here is the code:
It sound like to me the python will need to be update?
I'm having a problem with the python, I'm running the code as it works fine without have any problem. When I close the skin window to return to the main menu and when I reopen them to run the code again, I will get an error to something like this:
Code:
TypeError: attribute of type 'NoneType' is not callable
The error are jumping on this line:
Code:
program_startdate = datetime.datetime.strptime(str(row[2]), "%Y%m%d%H%M%S")
Here is the code:
Code:
import time
import _strptime
#get the programs list
cur.execute('SELECT channel, title, start_date, stop_date FROM programs WHERE channel="channel"')
programList = list()
programs = cur.fetchall()
for row in programs:
program = row[1].encode('ascii'), str(row[2]), str(row[3])
program_startdate = datetime.datetime.strptime(str(row[2]), "%Y%m%d%H%M%S")
program_endDate = datetime.datetime.strptime(str(row[3]), "%Y%m%d%H%M%S")
# find nearest half hour
viewStartDate = datetime.datetime.today()
viewStartDate -= datetime.timedelta(minutes = viewStartDate.minute % 30, seconds = viewStartDate.second)
It sound like to me the python will need to be update?