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.

classification
Title: os.utime can fail with TypeError
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: bescoto, nnorwitz
Priority: normal Keywords:

Created on 2003-03-13 16:40 by bescoto, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Messages (3)
msg15120 - (view) Author: Ben Escoto (bescoto) Date: 2003-03-13 16:40
Occasionally os.utime can fail with a TypeError:

# python
Python 2.2.2 (#1, Dec 16 2002, 02:51:47)
[GCC 3.2.1] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import os,time
>>>
os.utime("/backup/test/interhost/ace/.maildir-sent/cur/rdiff-backup.tmp.1980",
... (time.time(), 1038064008));
Traceback (most recent call last):
  File "<stdin>", line 2, in ?
TypeError: utime() arg 2 must be a tuple (atime, mtime)

if one of the elements in the time pair is a float and
not a long.  Strangely it seems to work sporadically. 
It may just be a documentation problem -- add a note in
the docs saying longs are required, and then have the
TypeError say:

TypeError: utime() arg 2 must be a tuple of longs
(atime, mtime)
msg15121 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-05-22 21:39
Logged In: YES 
user_id=33168

Ben, I can't reproduce this problem with 2.2.3 or 2.3.  Can
you verify this is still a problem?
msg15122 - (view) Author: Ben Escoto (bescoto) Date: 2003-06-23 20:18
Logged In: YES 
user_id=218965

Hmm, I'm not seeing it now.  Was very strange to begin with,
hope (for personal sanity) that it existed to begin with. 
Closing...
History
Date User Action Args
2022-04-10 16:07:38adminsetgithub: 38159
2003-03-13 16:40:18bescotocreate