Bugs item #1559515, was opened at 2006-09-15 11:08
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1559515&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: betatim (thead)
Assigned to: Nobody/Anonymous (nobody)
Summary: time.strptime() access non existant attribute in calendar.py

Initial Comment:
>>> import time
>>> time.strptime(time.ctime())
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/_strptime.py", line 269, in ?
    _TimeRE_cache = TimeRE()
  File "/usr/lib/python2.4/_strptime.py", line 188, in
__init__
    self.locale_time = LocaleTime()
  File "/usr/lib/python2.4/_strptime.py", line 74, in
__init__
    self.__calc_weekday()
  File "/usr/lib/python2.4/_strptime.py", line 94, in
__calc_weekday
    a_weekday = [calendar.day_abbr[i].lower() for i in
range(7)]
AttributeError: 'module' object has no attribute 'day_abbr'
>>> time.ctime() 
'Fri Sep 15 19:06:18 2006'

The default format used by strptime() should match the
output of ctime(). Even when specifying the format I
get exactly the same error.

I have recently upgraded to gcc 4.1.1 and glibc-2.4-r3.
Using python-2.4.3.

I am not quite sure what causes this.


cheers tim

----------------------------------------------------------------------

>Comment By: Brett Cannon (bcannon)
Date: 2006-09-15 12:41

Message:
Logged In: YES 
user_id=357491

Tested on Python 2.4, 2.5, and trunk and all work for me. 
Closing as invalid.

If you look at the traceback there is an issue with the
calendar module in your installation, not with
time.strptime() (looks like calendar.day_abbr is missing). 
I would run test_calendar and see what happens with that. 
If that test fails then file a bug report on that (and maybe
also test_datetime since that is where the calendar module
gets its information for the day-abbr).

----------------------------------------------------------------------

Comment By: betatim (thead)
Date: 2006-09-15 12:04

Message:
Logged In: YES 
user_id=1231298

to make sure there wasn't anything boviously wrong with my
time and strptime i run test_time.py and test_strptime.py
both of which have passed all tests

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1559515&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to