diff --git a/calibre-plugin/__init__.py b/calibre-plugin/__init__.py index 992a08e..ea2a0f7 100644 --- a/calibre-plugin/__init__.py +++ b/calibre-plugin/__init__.py @@ -48,6 +48,7 @@ # # v0.1.0: Continue work on renaming from "DeACSM" to "ACSM Input". # The big version number jump is to make that name change clearer. +# Print useful warning if LicenseServiceCertificate download fails. diff --git a/calibre-plugin/libadobeFulfill.py b/calibre-plugin/libadobeFulfill.py index b2b0eeb..32a4183 100644 --- a/calibre-plugin/libadobeFulfill.py +++ b/calibre-plugin/libadobeFulfill.py @@ -305,9 +305,13 @@ def buildRights(license_token_node): found = True break except: - return None + pass if not found: + print("Did not find the licenseService certificate in the activation data.") + print("This usually means it failed to download from the distributor's servers.") + print("Please try to download an ACSM book from the Adobe Sample Library, then if that was successful, ") + print("try your ACSM book file again.") return None ret += "\n" @@ -476,6 +480,8 @@ def fulfill(acsm_file, do_notify = False): success, response = fetchLicenseServiceCertificate(licenseURL, operatorURL) if success is False: + print("Why did the license download fail?") + print("This is probably a temporary error on the distributor's server") return False, response return True, replyData @@ -863,7 +869,10 @@ def fetchLicenseServiceCertificate(licenseURL, operatorURL): licenseServiceInfoReq = operatorURL + "/LicenseServiceInfo?licenseURL=" + licenseURL - response = sendHTTPRequest(licenseServiceInfoReq).decode("utf-8") + try: + response = sendHTTPRequest(licenseServiceInfoReq).decode("utf-8") + except: + return False, "HTTP download for the licenseServiceInfo failed ... why?" if "