Skip to content

get_options_data fails when given only the month #6105

Closed
@jburroni

Description

@jburroni

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIO DataIO issues that don't fit into a more specific label

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions