Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Mar 12, 2025 7:07 am

(venve) G:\olm_docx\app\services\mixQuestion>python test.py
Traceback (most recent call last):
File "G:\olm_docx\app\services\mixQuestion\test.py", line 20, in <module>
mathml_str = obj.ToMathMLCode()
^^^^^^^^^^^^^^^^^^
File "G:\olm_docx\app\services\mixQuestion\venve\Lib\site-packages\spire\doc\OfficeMath.py", line 108, in ToMathMLCode
ret = PtrToStr(CallCFunction(GetDllLibDoc().OfficeMath_ToMathMLCode,self.Ptr))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\olm_docx\app\services\mixQuestion\venve\Lib\site-packages\spire\doc\common\__init__.py", line 129, in CallCFunction
raise SpireException(info)
spire.doc.common.SpireException: TypeInitialization_Type_NoTypeAvailable: at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x167
at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnGCStaticBase(StaticClassConstructionContext*, Object) + 0xd
at System.Xml.Xsl.IlGen.XmlILModule.DefineMethod(String, Type, Type[], String[], XmlILMethodAttributes) + 0x360
at System.Xml.Xsl.XmlILGenerator.CreateHelperFunctions() + 0x87
at System.Xml.Xsl.XmlILGenerator.Generate(QilExpression, TypeBuilder) + 0x18a
at System.Xml.Xsl.XslCompiledTransform.CompileQilToMsil(XsltSettings) + 0x23
at System.Xml.Xsl.XslCompiledTransform.Load(XmlReader) + 0x5a
at Spire.Doc.Fields.OMath.OfficeMath.spra(String, Stream) + 0x99
at Spire.Doc.AOT.NLOfficeMath.OfficeMath_ToMathMLCode(IntPtr, IntPtr) + 0x4e

ntuan310203
 
Posts: 2
Joined: Wed Mar 12, 2025 5:50 am

Wed Mar 12, 2025 10:11 am

Hello,

Thanks for your inquiry.
Sorry, our Spire.Doc for Python does not support this feature yet. I have added it to our update list with ticket SPIREDOC-11157, and our development team will further implement it. Once there is any progress, I will inform you as soon as possible.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 657
Joined: Mon Dec 27, 2021 2:23 am

Wed Apr 30, 2025 11:52 am

Hello,

Thanks for your patience.
We just released the latest Spire.Doc for Python Version:13.4.6 which fixes issue SPIREDOC-11157 . Welcome to update and test.
WebSite Link:https://www.e-iceblue.com/Download/Spire-Doc-Python.html

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 657
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.Doc