# Buggy code
def _from_table(self, t):
    """
    Extract the data, metadata and units from an astropy table for use in
    constructing a TimeSeries.

    Parameters
    ----------
    t: `~astropy.table.table.Table`
        The input table. The datetime column must be the first column or the
        (single) primary key index.

    Returns
    -------
    data : `~pandas.core.frame.DataFrame`
    meta : `~sunpy.util.metadata.MetaDict`
    units : `dict`
    """
    table = copy.deepcopy(t)
    # Default the time index to the first column
    index_name = table.colnames[0]
    # Check if another column is defined as the index/primary_key
    if table.primary_key:
        # Check there is only one primary_key/index column
        if len(table.primary_key) == 1:
            table.primary_key[0]
        else:
            raise ValueError(
                "Invalid input Table, TimeSeries doesn't support conversion"
                " of tables with more then one index column."
            )

    # Extract, convert and remove the index column from the input table
    index = table[index_name]
    # Convert if the index is given as an astropy Time object
    if isinstance(index, Time):
        index = index.datetime
    index = pd.to_datetime(index)
    table.remove_column(index_name)

    # Extract the column values from the table
    data = {}
    units = {}
    for colname in table.colnames:
        data[colname] = table[colname]
        units[colname] = table[colname].unit

    # Create a dataframe with this and return
    df = pd.DataFrame(data=data, index=index)
    return df, MetaDict(table.meta), units


# Traceback (ValueError)
In [3]: g = TimeSeries('../flarenet/data/goes/go06860129.fits')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-3-686c02e70652> in <module>()
----> 1 g = TimeSeries('../flarenet/data/goes/go06860129.fits')

~/Projects/sunpydev/sunpy/timeseries/timeseries_factory.py in __call__(self, *args, **kwargs)
442             cls = types[0]
443
--> 444             data_header_unit_tuples.append(cls._parse_hdus(pairs))
445
446         # Loop over each registered type and check to see if WidgetType

~/Projects/sunpydev/sunpy/timeseries/sources/goes.py in _parse_hdus(cls, hdulist)
169             seconds_from_start = hdulist[2].data['TIME'][0]
170         elif 1 <= len(hdulist) <= 3:
--> 171             start_time = parse_time(header['TIMEZERO'])
172             seconds_from_start = hdulist[0].data[0]
173             xrsb = hdulist[0].data[1]

~/Projects/sunpydev/sunpy/time/time.py in parse_time(time_string, format, **kwargs)
291         rt = Time.now()
292     else:
--> 293         rt = convert_time(time_string, format=format, **kwargs)
294
295     return rt

~/.pyenv/versions/3.6.3/lib/python3.6/functools.py in wrapper(*args, **kw)
801
802     def wrapper(*args, **kw):
--> 803         return dispatch(args[0].__class__)(*args, **kw)
804
805     registry[object] = func

~/Projects/sunpydev/sunpy/time/time.py in convert_time(time_string, format, **kwargs)
138 def convert_time(time_string, format=None, **kwargs):
139     # default case when no type matches
--> 140     return Time(time_string, format=format, **kwargs)
141
142

~/.virtualenvs/sunpy-dev/lib/python3.6/site-packages/astropy/time/core.py in __init__(self, val, val2, format, scale, precision, in_subfmt, out_subfmt, location, copy)
397         else:
398             self._init_from_vals(val, val2, format, scale, copy,
--> 399                                  precision, in_subfmt, out_subfmt)
400             self.SCALES = TIME_TYPES[self.scale]
401

~/.virtualenvs/sunpy-dev/lib/python3.6/site-packages/astropy/time/core.py in _init_from_vals(self, val, val2, format, scale, copy, precision, in_subfmt, out_subfmt)
452         # Parse / convert input values into internal jd1, jd2 based on format
453         self._time = self._get_time_fmt(val, val2, format, scale,
--> 454                                         precision, in_subfmt, out_subfmt)
455         self._format = self._time.name
456

~/.virtualenvs/sunpy-dev/lib/python3.6/site-packages/astropy/time/core.py in _get_time_fmt(self, val, val2, format, scale, precision, in_subfmt, out_subfmt)
485                   format.lower() in self.FORMATS):
486             if format is None:
--> 487                 raise ValueError("No time format was given, and the input is "
488                                  "not unique")
489             else:

ValueError: No time format was given, and the input is not unique

# Fixed code
def _from_table(t):
    """
    Extract the data, metadata and units from an astropy table for use in
    constructing a TimeSeries.

    Parameters
    ----------
    t: `~astropy.table.table.Table`
        The input table. The datetime column must be the first column or the
        (single) primary key index.

    Returns
    -------
    data : `~pandas.core.frame.DataFrame`
    meta : `~sunpy.util.metadata.MetaDict`
    units : `dict`
    """
    table = copy.deepcopy(t)
    # Default the time index to the first column
    index_name = table.colnames[0]
    # Check if another column is defined as the index/primary_key
    if table.primary_key:
        # Check there is only one primary_key/index column
        if len(table.primary_key) != 1:
            raise ValueError(
                "Invalid input Table, TimeSeries doesn't support conversion"
                " of tables with more then one index column."
            )

    # Extract, convert and remove the index column from the input table
    index = table[index_name]
    # Convert if the index is given as an astropy Time object
    if isinstance(index, Time):
        index = index.datetime
    index = pd.to_datetime(index)
    table.remove_column(index_name)

    # Extract the column values from the table
    data = {}
    units = {}
    for colname in table.colnames:
        data[colname] = table[colname]
        units[colname] = table[colname].unit

    # Create a dataframe with this and return
    df = pd.DataFrame(data=data, index=index)
    return df, MetaDict(table.meta), units