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 <1334751988.35.0.313625977941.issue14613@psf.upfronthosting.co.za>
In-reply-to
Content
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):

https://bugs.launchpad.net/ubuntu/+source/ubuntuone-control-panel/+bug/844435

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

https://launchpadlibrarian.net/79283418/Traceback.txt

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