diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exportsApi.py b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exportsApi.py index 87db86ae0b980898db67d72e61970d01b5147637..1120f300dbff15d1477dd8ef8828cb798ff78e97 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exportsApi.py +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exportsApi.py @@ -496,7 +496,7 @@ def getDOCX(entityObj, v3, sessionToken, isHTML): if propertyType.getDataType() is DataType.XML and propertyType.getMetaData().get("custom_widget") == "Spreadsheet" \ and propertyValue.upper().startswith("<DATA>") and propertyValue.upper().endswith("</DATA>"): propertyValue = propertyValue[6:-7].decode('base64') - propertyValue = convertJsonToHtml(json.loads(propertyValue)) + propertyValue = convertJsonToHtml(json.loads(propertyValue.encode("utf8"))) if propertyValue != u"\uFFFD(undefined)": docxBuilder.addProperty(propertyType.getLabel(), propertyValue); @@ -613,7 +613,7 @@ def getTXT(entityObj, v3, sessionToken, isRichText): if propertyType.getDataType() is DataType.XML and propertyType.getMetaData().get("custom_widget") == "Spreadsheet" \ and propertyValue.upper().startswith("<DATA>") and propertyValue.upper().endswith("</DATA>"): propertyValue = propertyValue[6:-7].decode('base64') - propertyValue = "\n" + convertJsonToText(json.loads(propertyValue)) + propertyValue = "\n" + convertJsonToText(json.loads(propertyValue.encode("utf8"))) elif(propertyType.getDataType() == DataType.MULTILINE_VARCHAR and isRichText is False): propertyValue = strip_tags(propertyValue).strip(); txtBuilder.append("- ").append(propertyType.getLabel()).append(": ").append(propertyValue).append("\n"); @@ -643,7 +643,7 @@ def objToStrArray(objArray): for subObjArray in objArray: row = [] for obj in subObjArray: - row.append(str(obj)) + row.append(obj) result.append(row) return result diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/generalExports.py b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/generalExports.py index b8e43ee8ee5170f8b32362913f1defe636a17206..4fcecceb8d106d185a775ae3f0734dd98f4a6fce 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/generalExports.py +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/generalExports.py @@ -15,7 +15,7 @@ # import threading - +import traceback import time from ch.systemsx.cisd.common.logging import LogCategory from ch.systemsx.cisd.common.mail import EMailAddress @@ -98,7 +98,7 @@ def generateZipFile(entities, includeRoot, sessionToken, tempDirPath, tempZipFil try: generateFilesInZip(zos, entities, includeRoot, sessionToken, tempDirPath) except BaseException as e: - operationLog.error("Error occurred: %s" % e) + operationLog.error("Error occurred: %s" % traceback.format_exc()) except Throwable as e: operationLog.error("Error occurred: %s" % e, e) finally: