'Constructor.
Args:
req: The QNetworkRequest associated with this reply.
errorstring: The error string to print.
error: The numerical error value.
parent: The parent to pass to QNetworkReply.'

def __init__(self, req, errorstring, error, parent=None):

    super().__init__(parent)
    self.setRequest(req)
    self.setUrl(req.url())
    self.setOpenMode(QIODevice.ReadOnly)
    self.setError(error, errorstring)
    QTimer.singleShot(0, (lambda : self.error.emit(error)))
    QTimer.singleShot(0, (lambda : self.finished.emit()))
