# Buggy code
def _validate_meta(self, meta):
    """
    Validate a meta argument for use as metadata.
    Currently only validates by class.
    """
    if isinstance(meta, astropy.io.fits.header.Header):
        return True
    elif isinstance(meta, sunpy.io.header.FileHeader):
        return True
    elif isinstance(meta, dict):
        return True
    else:
        return False


# 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 _validate_meta(meta):
    """
    Validate a meta argument for use as metadata.
    Currently only validates by class.
    """
    if isinstance(meta, astropy.io.fits.header.Header):
        return True
    elif isinstance(meta, sunpy.io.header.FileHeader):
        return True
    elif isinstance(meta, dict):
        return True
    else:
        return False