# Buggy code
def _get_slice_axis(self, slice_obj, axis=0):
    obj = self.obj

    axis_name = obj._get_axis_name(axis)
    labels = getattr(obj, axis_name)

    int_slice = _is_index_slice(slice_obj)

    start = slice_obj.start
    stop = slice_obj.stop

    # in case of providing all floats, use label-based indexing
    float_slice = (
        labels.inferred_type == "floating"
        and (type(start) == float or start is None)
        and (type(stop) == float or stop is None)
    )

    null_slice = slice_obj.start is None and slice_obj.stop is None

    # could have integers in the first level of the MultiIndex, in which
    # case we wouldn't want to do position-based slicing
    position_slice = (
        int_slice
        and labels.inferred_type != "integer"
        and not isinstance(labels, MultiIndex)
        and not float_slice
    )

    # last ditch effort: if we are mixed and have integers
    try:
        if "mixed" in labels.inferred_type and int_slice:
            if start is not None:
                i = labels.get_loc(start)
            if stop is not None:
                j = labels.get_loc(stop)
            position_slice = False
    except KeyError:
        if labels.inferred_type == "mixed-integer":
            raise

    if null_slice or position_slice:
        slicer = slice_obj
    else:
        try:
            i, j = labels.slice_locs(start, stop)
            slicer = slice(i, j, slice_obj.step)
        except Exception:
            if _is_index_slice(slice_obj):
                if labels.inferred_type == "integer":
                    raise
                slicer = slice_obj
            else:
                raise

    if not _need_slice(slice_obj):
        return obj

    return self._slice(slicer, axis=axis)


# Traceback (ValueError)
In [17]: date_range(datetime.datetime.today(), periods=10, freq='2h20m')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/home/chang/Dropbox/git/pandas/<ipython-input-17-ff4e03382573> in <module>()
----> 1 date_range(datetime.datetime.today(), periods=10, freq='2h20m')

/home/chang/Dropbox/git/pandas/pandas/tseries/index.pyc in date_range(start, end, periods, freq, tz, normalize)
1209     """
1210     return DatetimeIndex(start=start, end=end, periods=periods,
-> 1211                          freq=freq, tz=tz, normalize=normalize)
1212
1213

/home/chang/Dropbox/git/pandas/pandas/tseries/index.pyc in __new__(cls, data, freq, start, end, periods, copy, name, tz, verify_integrity, normalize, **kwds)
202
203         if data is None and offset is None:
--> 204             raise ValueError("Must provide freq argument if no data is "
205                              "supplied")
206

ValueError: Must provide freq argument if no data is supplied

# Fixed code
def _get_slice_axis(self, slice_obj, axis=0):
    obj = self.obj

    axis_name = obj._get_axis_name(axis)
    labels = getattr(obj, axis_name)

    int_slice = _is_index_slice(slice_obj)

    start = slice_obj.start
    stop = slice_obj.stop

    # in case of providing all floats, use label-based indexing
    float_slice = labels.inferred_type == "floating" and _is_float_slice(slice_obj)

    null_slice = slice_obj.start is None and slice_obj.stop is None

    # could have integers in the first level of the MultiIndex, in which
    # case we wouldn't want to do position-based slicing
    position_slice = (
        int_slice
        and labels.inferred_type != "integer"
        and not isinstance(labels, MultiIndex)
        and not float_slice
    )

    # last ditch effort: if we are mixed and have integers
    try:
        if "mixed" in labels.inferred_type and int_slice:
            if start is not None:
                i = labels.get_loc(start)
            if stop is not None:
                j = labels.get_loc(stop)
            position_slice = False
    except KeyError:
        if labels.inferred_type == "mixed-integer":
            raise

    if null_slice or position_slice:
        slicer = slice_obj
    else:
        try:
            i, j = labels.slice_locs(start, stop)
            slicer = slice(i, j, slice_obj.step)
        except Exception:
            if _is_index_slice(slice_obj):
                if labels.inferred_type == "integer":
                    raise
                slicer = slice_obj
            else:
                raise

    if not _need_slice(slice_obj):
        return obj

    return self._slice(slicer, axis=axis)