[Tutor] Message 'list' object has no attribute 'strptime ?

greg whittier greg at thewhittiers.com
Thu Sep 4 20:19:15 CEST 2008


On Thu, Sep 4, 2008 at 2:00 PM, Wayne Watson
<sierra_mtnview at sbcglobal.net>wrote:

>  The line
>     x = time.strptime(fmt_time, "%H %M %S")
> with fmt_time = "11 12 40"
> in function produces the msg:
> Traceback (most recent call last):
>   File
> "C:\Sandia_Meteors\Improved_Sentinel\Sentinel_Playground\Utility_Dev\SU_DateTimeAdjust.py",
> line 209, in ?
>     if not verify_time(bump_time):
>   File
> "C:\Sandia_Meteors\Improved_Sentinel\Sentinel_Playground\Utility_Dev\SU_DateTimeAdjust.py",
> line 69, in verify_time
>     x = time.strptime(fmt_time, "%H %M %S")
> AttributeError: 'list' object has no attribute 'strptime'
>

It looks like time is getting set to a list somewhere.  Look at the code to
figure out just what's in "time" at that point.  You also might try a "print
time" before that line or check it's value with a debugger.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080904/4916e42c/attachment.htm>


More information about the Tutor mailing list