tz.tzstr() fails on parsing timezone data file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dateutil |
New
|
Undecided
|
Unassigned |
Bug Description
With dateutil 2.2, I can't get the tzstr examples working (see below). It throws an error 'str' object has no attribute 'read'. Looking at the code, it fails on self.instream.
In [3]: import dateutil.tz
In [4]: dateutil.
-------
AttributeError Traceback (most recent call last)
<ipython-
----> 1 dateutil.
/Library/
579 self._s = s
580
--> 581 res = parser._parsetz(s)
582 if res is None:
583 raise ValueError("unknown string format")
/Library/
923 DEFAULTTZPARSER = _tzparser()
924 def _parsetz(tzstr):
--> 925 return DEFAULTTZPARSER
926
927
/Library/
770 def parse(self, tzstr):
771 res = self._result()
--> 772 l = _timelex.
773 try:
774
/Library/
148
149 def split(cls, s):
--> 150 return list(cls(s))
151 split = classmethod(split)
152
This also fails for me with python-dateutil 2.1. In both 2.1 and 2.2, the function works as documented under Python 3.3.3. When I run it under Python 2.7.5 it throws the exception shown above.