# Buggy code
def __init__(self, message, no_version_found=False):
    extra = (
        "{0}: Your dependencies could not be resolved. You likely have a "
        "mismatch in your sub-dependencies.\n  "
        "First try clearing your dependency cache with {1}, then try the original command again.\n "
        "Alternatively, you can use {2} to bypass this mechanism, then run "
        "{3} to inspect the situation.\n  "
        "Hint: try {4} if it is a pre-release dependency."
        "".format(
            crayons.red("Warning", bold=True),
            crayons.red("$ pipenv lock --clear"),
            crayons.red("$ pipenv install --skip-lock"),
            crayons.red("$ pipenv graph"),
            crayons.red("$ pipenv lock --pre"),
        ),
    )
    if "no version found at all" in message:
        no_version_found = True
    message = "{0} {1}".format(
        crayons.red("ERROR:", bold=True), crayons.yellow(message)
    )
    if no_version_found:
        message = "{0}\n{1}".format(
            message,
            crayons.blue(
                "Please check your version specifier and version number. "
                "See PEP440 for more information."
            ),
        )
    super(ResolutionFailure, self).__init__(fix_utf8(message), extra=extra)


# Traceback (json.decoder.JSONDecodeError)
$ pipenv check --system
Checking PEP 508 requirements...
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/pipenv/cli.py", line 762, in check
pypi_mirror=pypi_mirror
File "/usr/local/lib/python3.5/dist-packages/pipenv/core.py", line 2295, in do_check
results = simplejson.loads(c.out)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

# Fixed code
def __init__(self, message, no_version_found=False):
    extra = (
        "{0}: Your dependencies could not be resolved. You likely have a "
        "mismatch in your sub-dependencies.\n  "
        "First try clearing your dependency cache with {1}, then try the original command again.\n "
        "Alternatively, you can use {2} to bypass this mechanism, then run "
        "{3} to inspect the situation.\n  "
        "Hint: try {4} if it is a pre-release dependency."
        "".format(
            crayons.red("Warning", bold=True),
            crayons.red("$ pipenv lock --clear"),
            crayons.red("$ pipenv install --skip-lock"),
            crayons.red("$ pipenv graph"),
            crayons.red("$ pipenv lock --pre"),
        ),
    )
    if "no version found at all" in message:
        no_version_found = True
    message = "{0} {1}".format(
        crayons.red("ERROR:", bold=True), crayons.yellow(message)
    )
    if no_version_found:
        message = "{0}\n{1}".format(
            message,
            crayons.blue(
                "Please check your version specifier and version number. "
                "See PEP440 for more information."
            ),
        )
    super(ResolutionFailure, self).__init__(decode_for_output(message), extra=extra)