# Buggy code
def __init__(self, filename, n_atoms, title="TRZ", convert_units=None):
    """Create a TRZWriter

    Parameters
    ----------
    filename : str
        name of output file
    n_atoms : int
        number of atoms in trajectory
    title : str (optional)
        title of the trajectory; the title must be 80 characters or
        shorter, a longer title raises a ValueError exception.
    convert_units : bool (optional)
        units are converted to the MDAnalysis base format; ``None`` selects
        the value of :data:`MDAnalysis.core.flags` ['convert_lengths'].
        (see :ref:`flags-label`)
    """
    self.filename = filename
    if n_atoms is None:
        raise ValueError("TRZWriter requires the n_atoms keyword")
    if n_atoms == 0:
        raise ValueError("TRZWriter: no atoms in output trajectory")
    self.n_atoms = n_atoms

    if len(title) > 80:
        raise ValueError("TRZWriter: 'title' must be 80 characters of shorter")

    if convert_units is None:
        convert_units = flags["convert_lengths"]
    self.convert_units = convert_units

    self.trzfile = util.anyopen(self.filename, "wb")

    self._writeheader(title)

    floatsize = str(n_atoms) + "f4"
    self.frameDtype = np.dtype(
        [
            ("p1a", "i4"),
            ("nframe", "i4"),
            ("ntrj", "i4"),
            ("natoms", "i4"),
            ("treal", "f8"),
            ("p1b", "i4"),
            ("p2a", "i4"),
            ("box", "9f8"),
            ("p2b", "i4"),
            ("p3a", "i4"),
            ("pressure", "f8"),
            ("ptensor", "6f8"),
            ("p3b", "i4"),
            ("p4a", "i4"),
            ("six", "i4"),
            ("etot", "f8"),
            ("ptot", "f8"),
            ("ek", "f8"),
            ("T", "f8"),
            ("blanks", "2f8"),
            ("p4b", "i4"),
            ("p5a", "i4"),
            ("rx", floatsize),
            ("p5b", "i4"),
            ("p6a", "i4"),
            ("ry", floatsize),
            ("p6b", "i4"),
            ("p7a", "i4"),
            ("rz", floatsize),
            ("p7b", "i4"),
            ("p8a", "i4"),
            ("vx", floatsize),
            ("p8b", "i4"),
            ("p9a", "i4"),
            ("vy", floatsize),
            ("p9b", "i4"),
            ("p10a", "i4"),
            ("vz", floatsize),
            ("p10b", "i4"),
        ]
    )


# Traceback (IOError)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/case.py", line 381, in setUp
try_run(self.inst, ('setup', 'setUp'))
File "/usr/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
return func()
File "/builddir/build/BUILD/MDAnalysis-0.16.1/MDAnalysisTests-0.16.1/MDAnalysisTests/analysis/test_hydrogenbondautocorrel.py", line 37, in setUp
u = self.u = mda.Universe(TRZ_psf, TRZ)
File "/builddir/build/BUILDROOT/python-MDAnalysis-0.16.1-2.fc27.ppc64/usr/lib64/python2.7/site-packages/MDAnalysis/core/universe.py", line 278, in __init__
self.load_new(coordinatefile, **kwargs)
File "/builddir/build/BUILDROOT/python-MDAnalysis-0.16.1-2.fc27.ppc64/usr/lib64/python2.7/site-packages/MDAnalysis/core/universe.py", line 426, in load_new
self.trajectory = reader(filename, **kwargs)
File "/builddir/build/BUILDROOT/python-MDAnalysis-0.16.1-2.fc27.ppc64/usr/lib64/python2.7/site-packages/MDAnalysis/coordinates/TRZ.py", line 175, in __init__
self._read_trz_header()
File "/builddir/build/BUILDROOT/python-MDAnalysis-0.16.1-2.fc27.ppc64/usr/lib64/python2.7/site-packages/MDAnalysis/coordinates/TRZ.py", line 242, in _read_trz_header
raise IOError
IOError:

# Fixed code
def __init__(self, filename, n_atoms, title="TRZ", convert_units=None):
    """Create a TRZWriter

    Parameters
    ----------
    filename : str
        name of output file
    n_atoms : int
        number of atoms in trajectory
    title : str (optional)
        title of the trajectory; the title must be 80 characters or
        shorter, a longer title raises a ValueError exception.
    convert_units : bool (optional)
        units are converted to the MDAnalysis base format; ``None`` selects
        the value of :data:`MDAnalysis.core.flags` ['convert_lengths'].
        (see :ref:`flags-label`)
    """
    self.filename = filename
    if n_atoms is None:
        raise ValueError("TRZWriter requires the n_atoms keyword")
    if n_atoms == 0:
        raise ValueError("TRZWriter: no atoms in output trajectory")
    self.n_atoms = n_atoms

    if len(title) > 80:
        raise ValueError("TRZWriter: 'title' must be 80 characters of shorter")

    if convert_units is None:
        convert_units = flags["convert_lengths"]
    self.convert_units = convert_units

    self.trzfile = util.anyopen(self.filename, "wb")

    self._writeheader(title)

    floatsize = str(n_atoms) + "<f4"
    self.frameDtype = np.dtype(
        [
            ("p1a", "<i4"),
            ("nframe", "<i4"),
            ("ntrj", "<i4"),
            ("natoms", "<i4"),
            ("treal", "<f8"),
            ("p1b", "<i4"),
            ("p2a", "<i4"),
            ("box", "<9f8"),
            ("p2b", "<i4"),
            ("p3a", "<i4"),
            ("pressure", "<f8"),
            ("ptensor", "<6f8"),
            ("p3b", "<i4"),
            ("p4a", "<i4"),
            ("six", "<i4"),
            ("etot", "<f8"),
            ("ptot", "<f8"),
            ("ek", "<f8"),
            ("T", "<f8"),
            ("blanks", "<2f8"),
            ("p4b", "<i4"),
            ("p5a", "<i4"),
            ("rx", floatsize),
            ("p5b", "<i4"),
            ("p6a", "<i4"),
            ("ry", floatsize),
            ("p6b", "<i4"),
            ("p7a", "<i4"),
            ("rz", floatsize),
            ("p7b", "<i4"),
            ("p8a", "<i4"),
            ("vx", floatsize),
            ("p8b", "<i4"),
            ("p9a", "<i4"),
            ("vy", floatsize),
            ("p9b", "<i4"),
            ("p10a", "<i4"),
            ("vz", floatsize),
            ("p10b", "<i4"),
        ]
    )