为有中文需求的客户提供多渠道中文技术支持.

Fri Aug 30, 2024 12:00 pm

streamlit run /Users/gengyang/PycharmProjects/zot/src/gtsc/ptcl/ptcl_deep_inspection_report.py [ARGUMENTS]
Traceback (most recent call last):
File "/Users/gengyang/PycharmProjects/zot/src/gtsc/ptcl/ptcl_deep_inspection_report.py", line 38, in <module>
workbook = Workbook()
File "/Users/gengyang/PycharmProjects/zot/venv/lib/python3.7/site-packages/plum/function.py", line 642, in __call__
return self.f(self.instance, *args, **kw_args)
File "/Users/gengyang/PycharmProjects/zot/venv/lib/python3.7/site-packages/plum/function.py", line 592, in __call__
return _convert(method(*args, **kw_args), return_type)
File "/Users/gengyang/PycharmProjects/zot/venv/lib/python3.7/site-packages/spire/xls/Workbook.py", line 18, in __init__
intPtr = CallCFunction(GetDllLibXls().Workbook_CreateWorkbook)
File "/Users/gengyang/PycharmProjects/zot/venv/lib/python3.7/site-packages/spire/xls/common/__init__.py", line 109, in CallCFunction
raise SpireException(info)
spire.xls.common.SpireException: TypeInitialization_Type_NoTypeAvailable: at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x148
at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnNonGCStaticBase(StaticClassConstructionContext*, IntPtr) + 0x9
at Spire.Xls.Core.Spreadsheet.XlsWorksheet.InitializeCollections() + 0x2c2
at Spire.Xls.Core.Spreadsheet.XlsWorksheet..ctor(Object) + 0x74
at Spire.Xls.Core.Spreadsheet.Collections.XlsWorksheetsCollection.Add(String) + 0xf8
at Spire.Xls.Core.Spreadsheet.XlsWorkbook.spra(Int32) + 0x35a
at Spire.Xls.Workbook..ctor() + 0x4f
at Spire.Xls.AOT.NLWorkbook.CreateWorkbook(IntPtr) + 0x4c
Exception ignored in: <function SpireObject.__del__ at 0x7fcef9e28320>
Traceback (most recent call last):
File "/Users/gengyang/PycharmProjects/zot/venv/lib/python3.7/site-packages/spire/xls/common/SpireObject.py", line 31, in __del__
CallCFunction(dlllib.Spire_FreeHandle,self.Ptr)
File "/Users/gengyang/PycharmProjects/zot/venv/lib/python3.7/site-packages/spire/xls/common/SpireObject.py", line 27, in Ptr
return self._ptr
AttributeError: 'Workbook' object has no attribute '_ptr'

gengyang
 
Posts: 1
Joined: Fri Aug 23, 2024 12:39 pm

Mon Sep 02, 2024 3:15 am

你好,

谢谢你的询问。根据你目前提供的信息,我猜测你的问题可能是由于没有安装SkiaSharp图形库造成的。在MacOS上使用Spire.XLS for Python,需要将 libSkiaSharp.dylib 文件(路径为:依赖安装目录/site-packages/spire/xls/lib)拷贝到工程根目录下。如果还有其他问题,请随时回复。

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 281
Joined: Mon Jul 15, 2024 5:40 am

Return to 中文技术支持