Gateway Error in Workbook. close (Lookup Error)

Hello,

I am Using ‘from xlsxwriter import Workbook’ Library In Gateway Scripting. It is Working fine In Script Console and Button. But In gateway side i am getting the Below attached Error. any one Please Give the Solution.
image
It is Showing error in workbook.close() Line 1793.

ERROR:

com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 3, in File "", line 1793, in sendMonthEmail File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py", line 316, in close self._store_workbook() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py", line 316, in close self._store_workbook() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py", line 679, in _store_workbook xml_files = packager._create_package() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/packager.py", line 146, in _create_package self._write_theme_file() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/packager.py", line 425, in _write_theme_file theme._assemble_xml_file() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/theme.py", line 46, in _assemble_xml_file self._write_theme_file() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/theme.py", line 71, in _write_theme_file default_theme = default_theme.decode('unicode-escape') LookupError: unknown encoding 'unicode-escape'

at org.python.core.codecs$CodecState.lookup(codecs.java:1717)

at org.python.core.codecs.lookup(codecs.java:58)

at org.python.core.codecs.decode(codecs.java:100)

at org.python.core.PyString.decode(PyString.java:4001)

at org.python.core.PyString.str_decode(PyString.java:4009)

at org.python.core.PyString$str_decode_exposer.__call__(Unknown Source)

at org.python.core.PyObject.__call__(PyObject.java:480)

at org.python.core.PyObject.__call__(PyObject.java:484)

at xlsxwriter.theme$py._write_theme_file$5(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/theme.py:73)

at xlsxwriter.theme$py.call_function(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/theme.py)

at org.python.core.PyTableCode.call(PyTableCode.java:171)

at org.python.core.PyBaseCode.call(PyBaseCode.java:139)

at org.python.core.PyFunction.__call__(PyFunction.java:413)

at org.python.core.PyMethod.__call__(PyMethod.java:126)

at xlsxwriter.theme$py._assemble_xml_file$3(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/theme.py:48)

at xlsxwriter.theme$py.call_function(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/theme.py)

at org.python.core.PyTableCode.call(PyTableCode.java:171)

at org.python.core.PyBaseCode.call(PyBaseCode.java:139)

at org.python.core.PyFunction.__call__(PyFunction.java:413)

at org.python.core.PyMethod.__call__(PyMethod.java:126)

at xlsxwriter.packager$py._write_theme_file$21(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/packager.py:425)

at xlsxwriter.packager$py.call_function(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/packager.py)

at org.python.core.PyTableCode.call(PyTableCode.java:171)

at org.python.core.PyBaseCode.call(PyBaseCode.java:139)

at org.python.core.PyFunction.__call__(PyFunction.java:413)

at org.python.core.PyMethod.__call__(PyMethod.java:126)

at xlsxwriter.packager$py._create_package$6(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/packager.py:155)

at xlsxwriter.packager$py.call_function(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/packager.py)

at org.python.core.PyTableCode.call(PyTableCode.java:171)

at org.python.core.PyBaseCode.call(PyBaseCode.java:139)

at org.python.core.PyFunction.__call__(PyFunction.java:413)

at org.python.core.PyMethod.__call__(PyMethod.java:126)

at xlsxwriter.workbook$py._store_workbook$23(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py:718)

at xlsxwriter.workbook$py.call_function(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py)

at org.python.core.PyTableCode.call(PyTableCode.java:171)

at org.python.core.PyBaseCode.call(PyBaseCode.java:139)

at org.python.core.PyFunction.__call__(PyFunction.java:413)

at org.python.core.PyMethod.__call__(PyMethod.java:126)

at xlsxwriter.workbook$py.close$10(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py:323)

at xlsxwriter.workbook$py.call_function(/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py)

at org.python.core.PyTableCode.call(PyTableCode.java:171)

at org.python.core.PyBaseCode.call(PyBaseCode.java:139)

at org.python.core.PyFunction.__call__(PyFunction.java:413)

at org.python.core.PyMethod.__call__(PyMethod.java:126)

at org.python.pycode._pyx5153.sendMonthEmail$5(:1859)

at org.python.pycode._pyx5153.call_function()

at org.python.core.PyTableCode.call(PyTableCode.java:171)

at org.python.core.PyBaseCode.call(PyBaseCode.java:125)

at org.python.core.PyFunction.__call__(PyFunction.java:403)

at org.python.pycode._pyx4376.f$0(:3)

at org.python.pycode._pyx4376.call_function()

at org.python.core.PyTableCode.call(PyTableCode.java:171)

at org.python.core.PyCode.call(PyCode.java:18)

at org.python.core.Py.runCode(Py.java:1614)

at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:799)

at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:678)

at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:745)

at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:659)

at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:247)

at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:199)

at com.inductiveautomation.ignition.common.util.SerialExecutionQueue$PollAndExecute.run(SerialExecutionQueue.java:102)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.base/java.lang.Thread.run(Unknown Source)

Caused by: org.python.core.PyException: Traceback (most recent call last): File "", line 3, in File "", line 1793, in sendMonthEmail File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py", line 316, in close self._store_workbook() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py", line 316, in close self._store_workbook() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/workbook.py", line 679, in _store_workbook xml_files = packager._create_package() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/packager.py", line 146, in _create_package self._write_theme_file() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/packager.py", line 425, in _write_theme_file theme._assemble_xml_file() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/theme.py", line 46, in _assemble_xml_file self._write_theme_file() File "/usr/local/bin/ignition/user-lib/pylib/xlsxwriter/theme.py", line 71, in _write_theme_file default_theme = default_theme.decode('unicode-escape') LookupError: unknown encoding 'unicode-escape'

... 66 common frames omitted