# Buggy code
async def clone(self) -> Tuple[str]:
    """Clone a new repo.

    Returns
    -------
    `tuple` of `str`
        All available module names from this repo.

    """
    exists, path = self._existing_git_repo()
    if exists:
        raise ExistingGitRepo("A git repo already exists at path: {}".format(path))

    if self.branch is not None:
        p = await self._run(
            self.GIT_CLONE.format(
                branch=self.branch, url=self.url, folder=self.folder_path
            ).split()
        )
    else:
        p = await self._run(
            self.GIT_CLONE_NO_BRANCH.format(
                url=self.url, folder=self.folder_path
            ).split()
        )

    if p.returncode != 0:
        raise CloningError("Error when running git clone.")

    if self.branch is None:
        self.branch = await self.current_branch()

    self._read_info_file()

    return self._update_available_modules()


# Traceback (UnicodeDecodeError)
Task exception was never retrieved
future: <Task finished coro=<RepoManager._load_repos() done, defined at /home/aikaterna/v3/lib/python3.6/site-packages/redbot/cogs/downloader/repo_manager.py:618> exception=UnicodeDecodeError('utf-8', b"\x01D\xc79\x12b\x9e\xd6\xa4\xb8\x13\x93TDR \xe3w\xd3@\xc4H$H=2\x0e48\xac\xa6V\xb2\xb3\x19\x1cu\xe9\xed\xae'\xac\xb2\xe7!j\xc7^\xb1\xca\xe2\xa6\xd8\xa8\x9e\xd8\xad\x95\xe6\xa7v)\x9a\x81\xef\xdc\xa2h\x9c~\xba&amp;\xc6G\x1d\x1c\x80\xc3\x10\xd7\xda\x96\xc7\x885$\xc0,\xb3\x12\x18\x89\xec\xb5\xa9e\x8ax1\x91\xc7\\\xa2\x04\x879\x14\xc3\x8a\xcaek*\xda\x9d\xda&amp;\xc6G\x1dL\x01\x92\xc6G\x1dr\x89\xa2r:$z", 2, 3, 'invalid continuation byte')>
Traceback (most recent call last):
File "/home/aikaterna/v3/lib/python3.6/site-packages/redbot/cogs/downloader/repo_manager.py", line 621, in _load_repos
ret[folder.stem] = await Repo.from_folder(folder)
File "/home/aikaterna/v3/lib/python3.6/site-packages/redbot/cogs/downloader/repo_manager.py", line 487, in from_folder
repo._update_available_modules()
File "/home/aikaterna/v3/lib/python3.6/site-packages/redbot/cogs/downloader/repo_manager.py", line 153, in _update_available_modules
curr_modules.append(Installable(location=self.folder_path / name))
File "/home/aikaterna/v3/lib/python3.6/site-packages/redbot/cogs/downloader/installable.py", line 68, in __init__
super().__init__(location)
File "/home/aikaterna/v3/lib/python3.6/site-packages/redbot/cogs/downloader/json_mixins.py", line 18, in __init__
self._read_info_file()
File "/home/aikaterna/v3/lib/python3.6/site-packages/redbot/cogs/downloader/installable.py", line 125, in _read_info_file
super()._read_info_file()
File "/home/aikaterna/v3/lib/python3.6/site-packages/redbot/cogs/downloader/json_mixins.py", line 28, in _read_info_file
info = json.load(f)
File "/usr/lib/python3.6/json/__init__.py", line 296, in load
return loads(fp.read(),
File "/home/aikaterna/v3/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc7 in position 2: invalid continuation byte

# Fixed code
async def clone(self) -> Tuple[str]:
    """Clone a new repo.

    Returns
    -------
    `tuple` of `str`
        All available module names from this repo.

    """
    exists, path = self._existing_git_repo()
    if exists:
        raise errors.ExistingGitRepo(
            "A git repo already exists at path: {}".format(path)
        )

    if self.branch is not None:
        p = await self._run(
            self.GIT_CLONE.format(
                branch=self.branch, url=self.url, folder=self.folder_path
            ).split()
        )
    else:
        p = await self._run(
            self.GIT_CLONE_NO_BRANCH.format(
                url=self.url, folder=self.folder_path
            ).split()
        )

    if p.returncode:
        # Try cleaning up folder
        shutil.rmtree(str(self.folder_path), ignore_errors=True)
        raise errors.CloningError("Error when running git clone.")

    if self.branch is None:
        self.branch = await self.current_branch()

    self._read_info_file()

    return self._update_available_modules()