Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time-zone handling error in NYISO local_now #57

Open
aschn opened this issue Mar 23, 2016 · 1 comment
Open

Time-zone handling error in NYISO local_now #57

aschn opened this issue Mar 23, 2016 · 1 comment

Comments

@aschn
Copy link
Contributor

aschn commented Mar 23, 2016

Traceback:

File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/nyiso.py", line 83, in get_trade
    df = self.get_any('ExternalLimitsFlows', self.parse_trade)
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/nyiso.py", line 144, in get_any
    dates_list = self.dates()
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/base.py", line 458, in dates
    local_now = self.local_now()
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/base.py", line 449, in local_now
    return pytz.utc.localize(datetime.utcnow()).astimezone(pytz.timezone(self.TZ_NAME))
AttributeError: 'America/New_York' object has no attribute 'fromutc'
@aschn
Copy link
Contributor Author

aschn commented Mar 23, 2016

Possibly related error:

File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/nyiso.py", line 67, in get_load
    df = self.get_any('pal', self.parse_load_rtm)
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/nyiso.py", line 150, in get_any
    pieces.append(parser(csv))
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/nyiso.py", line 202, in parse_load_rtm
    df.index = self.utcify_index(df.index, tz_col=df['Time Zone'])
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/nyiso.py", line 38, in utcify_index
    idx = super(NYISOClient, self).utcify_index(*args, **kwargs)
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/base.py", line 374, in utcify_index
    aware_local_ts = pytz.timezone(tz_name).localize(local_index[i])
  File "/app/.heroku/python/lib/python2.7/site-packages/pytz/tzinfo.py", line 311, in localize
    self._utc_transition_times, loc_dt) - 1)
TypeError: object of type 'NoneType' has no len()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant