This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients michael.foord, vstinner
Date 2012-04-18.12:26:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
time.time() can return None, or sometimes NaN. If it can't get a "proper" value from the OS then I would expect it to throw an exception. The docs don't mention anything about error conditions.

This was originally reported to Ubuntu One and there has been discussion / attempts to reproduce (it affects several people and so wasn't an isolated case):

The issue is that with the unexpected response from time.time(), a ValueError was caused later when converting the time:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntuone-control-panel/ubuntuone/controlpanel/web_client/", line 55, in _handler
    msg.status_code, msg.get_uri().to_string(False))
  File "/usr/lib/python2.7/logging/", line 1120, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/", line 1249, in _log
    record = self.makeRecord(, level, fn, lno, msg, args, exc_info, func, extra)
  File "/usr/lib/python2.7/logging/", line 1223, in makeRecord
    rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
  File "/usr/lib/python2.7/logging/", line 280, in __init__
    self.msecs = (ct - long(ct)) * 1000
ValueError: cannot convert float NaN to integer
Date User Action Args
2012-04-18 12:26:28michael.foordsetrecipients: + michael.foord, vstinner
2012-04-18 12:26:28michael.foordsetmessageid: <>
2012-04-18 12:26:27michael.foordlinkissue14613 messages
2012-04-18 12:26:27michael.foordcreate