TypeError: attribute of type 'NoneType' is not callable object - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Python Programming Language (https://www.supportforums.net/forumdisplay.php?fid=32) +---- Thread: TypeError: attribute of type 'NoneType' is not callable object (/showthread.php?tid=28715) |
TypeError: attribute of type 'NoneType' is not callable object - chris0147 - 09-05-2014 Hi all, I'm working on my python script as I'm pulling the data from the sqlite3 database. I'm trying to convert the string object to datetime object, but I have got a problem with the code as I get the error when I'm trying convert from the string object to datetime object. The error I'm getting is: 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 example the results from the sqlite3 database: Code: 20140520170000 Here is the code: Code: #get the channels list I'm using python version 2.6. Can you please help me how to fix the code to get rid of the error? Thanks in advance |