[Python-bugs-list] [ python-Bugs-409683 ] import tzparse --> fails

noreply@sourceforge.net noreply@sourceforge.net
Mon, 19 Mar 2001 02:41:44 -0800


Bugs item #409683, was updated on 2001-03-19 02:41
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=409683&group_id=5470

Category: Python Library
Group: None
Status: Open
Priority: 5
Submitted By: Hernan Martinez Foffani (hfoffani)
Assigned to: Nobody/Anonymous (nobody)
Summary: import tzparse --> fails

Initial Comment:
In Windows OS, an import tzparse fails. May be 
See below:

Python 2.1b1 (#11, Mar  2 2001, 11:23:29) [MSC 32 bit 
(Intel)] on win32
Type "copyright", "credits" or "license" for more 
information.
>>> import tzparse
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "c:\python21\lib\tzparse.py", line 67, in ?
    tzset()
  File "c:\python21\lib\tzparse.py", line 50, in tzset
    tzstr = os.environ['TZ']
  File "C:\Python21\lib\os.py", line 371, in 
__getitem__
    return self.data[key.upper()]
KeyError: TZ
>>>

At line 67 there is a call to tzset() which fails if:
- TZ environment variable is not set
- TZ is set but with an unrecognized format

Commenting such line works for me. I don't need 
tzparse, just was get the docs thru pydoc the utility. 
But that's just me, I don't know about other guys.
(BTW, the module is said to be obsolote)

I don't know if this is really a bug... I read GvR 
that Ping is going to change pydoc from "import" 
to "parse source"...




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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=409683&group_id=5470