Skip to content

get_options_data fails when given only the month #6105

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

Closed
jburroni opened this issue Jan 26, 2014 · 1 comment · Fixed by #6114
Closed

get_options_data fails when given only the month #6105

jburroni opened this issue Jan 26, 2014 · 1 comment · Fixed by #6114
Labels
Bug IO Data IO issues that don't fit into a more specific label
Milestone

Comments

@jburroni
Copy link

if you call this method using only the month, an UnboundedLocalError exception is trown

goog_opt.get_options_data(month=3)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/io/data.pyc in _get_option_data(self, month, year, expiry, table_loc, name)
    639 
    640         if month:
--> 641             name += m1 + str(year)[-2:]
    642         setattr(self, name, option_data)
    643         return option_data

UnboundLocalError: local variable 'm1' referenced before assignment

Apparently the issue is in here: https://github.com/pydata/pandas/blob/master/pandas/io/data.py#L639

@ghost ghost self-assigned this Jan 27, 2014
@ghost ghost closed this as completed in #6114 Jan 27, 2014
@ghost
Copy link

ghost commented Jan 27, 2014

Thanks for reporting. I pushed a Fix and it'll part of 0.13.1, due in a few days.

@wesm wesm unassigned ghost Oct 12, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant