Project

General

Profile

Bug #9373

Station monitor: "TypeError: can't compare datetime.datetime to NoneType"

Added by Christopher Backhouse over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
07/06/2015
Due date:
% Done:

0%

Estimated time:
Duration:

Description

Sometimes I get this from the station monitor for projects that haven't yet started.

Traceback (most recent call last):
  File "/home/sam/products/prd/cherrypy/v3_2_4/NULL/lib/python/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/home/sam/products/prd/cherrypy/v3_2_4/NULL/lib/python/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/home/sam/products/prd/cherrypy/v3_2_4/NULL/lib/python/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/home/sam/products/prd/sam_station_monitor/postgres/SAMStationMonitor.py", line 173, in projects
    projectinfo = self.monitor.dbquery.getProject(self.stationname, projectname)
  File "/home/sam/products/prd/sam_station_monitor/postgres/SAMStationMonitor.py", line 55, in getProject
    return self.getStation(station).getProject(project)
  File "/home/sam/products/prd/sam_station_monitor/postgres/StationProjectInfo.py", line 536, in getProject
    proj.update()
  File "/home/sam/products/prd/sam_station_monitor/postgres/StationProjectInfo.py", line 298, in update
    self._queryDB()
  File "/home/sam/products/prd/sam_station_monitor/postgres/StationProjectInfo.py", line 426, in _queryDB
    elif p.startTime > self.lastActivityTime:
TypeError: can't compare datetime.datetime to NoneType

If you refresh it's sometimes working and sometimes broken, about 50/50.

History

#1 Updated by Christopher Backhouse over 4 years ago

Actually this project page seems to be permanently broken:
http://samweb.fnal.gov:8480/station_monitor/nova/stations/nova/projects/bckhouse_decaf_2015.07.06_13.27.42
It's either that error or showing me one process waiting for over an hour, but samweb project-summary bckhouse_decaf_2015.07.06_13.27.42 shows that the project is progressing normally.

#2 Updated by Robert Illingworth over 4 years ago

You could get this if you ran the query before the project start time had been set in the database. It should be fixed now (in sam-station-monitor:c205ad94).

#3 Updated by Robert Illingworth over 4 years ago

  • Status changed from New to Resolved
  • Assignee set to Robert Illingworth


Also available in: Atom PDF