# Buggy code
def _partial_tup_index(self, tup, side="left"):
    if len(tup) > self.lexsort_depth:
        raise UnsortedIndexError(
            f"Key length ({len(tup)}) was greater than MultiIndex lexsort depth "
            f"({self.lexsort_depth})"
        )

    n = len(tup)
    start, end = 0, len(self)
    zipped = zip(tup, self.levels, self.codes)
    for k, (lab, lev, labs) in enumerate(zipped):
        section = labs[start:end]

        if lab not in lev and not isna(lab):
            if not lev.is_type_compatible(lib.infer_dtype([lab], skipna=False)):
                raise TypeError(f"Level type mismatch: {lab}")

            # short circuit
            loc = lev.searchsorted(lab, side=side)
            if side == "right" and loc >= 0:
                loc -= 1
            return start + section.searchsorted(loc, side=side)

        idx = self._get_loc_single_level_index(lev, lab)
        if k < n - 1:
            end = start + section.searchsorted(idx, side="right")
            start = start + section.searchsorted(idx, side="left")
        else:
            return start + section.searchsorted(idx, side=side)


# Traceback (TypeError)
In [1]: import pandas as pd

In [2]: index = pd.date_range('2001-01-01', periods=100)

In [3]: mindex = pd.MultiIndex.from_arrays([index])

In [4]: mindex.get_loc('2001-01')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-1914bb512715> in <module>
----> 1 mindex.get_loc('2001-01')

~/dev/pandas/pandas/core/indexes/multi.py in get_loc(self, key, method)
2257
2258         if not isinstance(key, tuple):
-> 2259             loc = self._get_level_indexer(key, level=0)
2260             return _maybe_to_slice(loc)
2261

~/dev/pandas/pandas/core/indexes/multi.py in _get_level_indexer(self, key, level, indexer)
2525                 return locs
2526
-> 2527             i = labels.searchsorted(code, side='left')
2528             j = labels.searchsorted(code, side='right')
2529             if i == j:

~/dev/pandas/pandas/util/_decorators.py in wrapper(*args, **kwargs)
175                 else:
176                     kwargs[new_arg_name] = new_arg_value
--> 177             return func(*args, **kwargs)
178         return wrapper
179     return _deprecate_kwarg

~/dev/pandas/pandas/core/indexes/frozen.py in searchsorted(self, value, side, sorter)
181         # xref: https://github.com/numpy/numpy/issues/5370
182         try:
--> 183             value = self.dtype.type(value)
184         except ValueError:
185             pass

TypeError: int() argument must be a string, a bytes-like object or a number, not 'slice'

# Fixed code
def _partial_tup_index(self, tup, side="left"):
    if len(tup) > self.lexsort_depth:
        raise UnsortedIndexError(
            f"Key length ({len(tup)}) was greater than MultiIndex lexsort depth "
            f"({self.lexsort_depth})"
        )

    n = len(tup)
    start, end = 0, len(self)
    zipped = zip(tup, self.levels, self.codes)
    for k, (lab, lev, labs) in enumerate(zipped):
        section = labs[start:end]

        if lab not in lev and not isna(lab):
            if not lev.is_type_compatible(lib.infer_dtype([lab], skipna=False)):
                raise TypeError(f"Level type mismatch: {lab}")

            # short circuit
            loc = lev.searchsorted(lab, side=side)
            if side == "right" and loc >= 0:
                loc -= 1
            return start + section.searchsorted(loc, side=side)

        idx = self._get_loc_single_level_index(lev, lab)
        if isinstance(idx, slice) and k < n - 1:
            # Get start and end value from slice, necessary when a non-integer
            # interval is given as input GH#37707
            start = idx.start
            end = idx.stop
        elif k < n - 1:
            end = start + section.searchsorted(idx, side="right")
            start = start + section.searchsorted(idx, side="left")
        elif isinstance(idx, slice):
            idx = idx.start
            return start + section.searchsorted(idx, side=side)
        else:
            return start + section.searchsorted(idx, side=side)