I switched the GQL Query to the following. Now the GQL Query no longer gives 500 severe error, but almost anything I code after that does give the 500 severe error. I need to test if I returned any rows or not, ideally one.
taskLogs = db.GqlQuery("SELECT * FROM TaskLog where taskCode = : 1 " + " and workerEmail = :2 " + " and eventStartedDateTime = :3", taskCode, users.get_current_user().email(), startedTime); #if taskLogs is None: # DebugText = "No rows returned" ###if len(taskLogs) <> 1: ### DebugText = " Error: more than one matching row found " #else: #DebugText = DebugText + " len(taskLogs) = " + len(taskLogs); #for taskLog in taskLogs: # taskLog1.eventStartedDateTime = datetime.datetime.now (); # taskLog1.put(); #save to BigTable database # DebugText = DebugText + " Updated Row " If I un-comment these two statements, I get the 500 severe error: #if taskLogs is None: # DebugText = "No rows returned" So why don't I get some kind of trapped error? I'm finding the only way to code this is to keep commenting out lines, and adding them back in, and taking them out until something seems to work. Even when I remove the date/time test, the following code runs: taskLogs = db.GqlQuery("SELECT * FROM TaskLog where taskCode = : 1 " + " and workerEmail = :2 ", taskCode, users.get_current_user().email() ); if taskLogs is None: DebugText = "No rows returned;" ###if len(taskLogs) <> 1: ### DebugText = " Error: more than one matching row found " else: DebugText = DebugText + "Rows Returned" #DebugText = DebugText + " len(taskLogs) = " + len(taskLogs); for taskLog in taskLogs: taskLog.eventCompletedDateTime = datetime.datetime.now (); taskLog.put(); #save to BigTable database DebugText = DebugText + " Updated Row; " What is the proper way to test the number of rows returned? Thanks again, Neal Walters --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---