|
|
本帖最后由 wuchinjung 于 2022-8-19 11:23 编辑 ) i$ o( g! k# d. `/ w
( [- T8 C$ W+ I" p
ProApp = win32com.client.Dispatch('MGCPCB.ExpeditionPEApplication.92')
6 g6 N# v" P& A7 ^/ u" K4 t這一行就報錯了7 y( A: |, j5 u! [5 V+ ^/ v" D& B
/ s" d6 ~3 L7 d8 n1 rTraceback (most recent call last):- \; V7 i, a, ?/ n* E. c2 _* m
File "C:\Program Files\Python310\lib\site-packages\win32com\client\dynamic.py", line 86, in _GetGoodDispatch
: ~: f6 n( q0 e2 J, w) ` IDispatch = pythoncom.connect(IDispatch)
7 x" M+ u. d/ J# dpywintypes.com_error: (-2147221005, '無效的類別字串', None, None)
) D& h) F2 b8 p% \2 O; E% v/ }! S5 \- c% f, G6 I
During handling of the above exception, another exception occurred:
9 C h8 Y+ s9 |$ u* ~0 O$ K7 x" H4 }) y0 d8 b6 }
Traceback (most recent call last):8 j9 s5 S, `( d; I
File "<pyshell#3>", line 1, in <module>) f1 ^, {# P: C# o0 D
ProApp = win32com.client.Dispatch('MGCPCB.ExpeditionPEApplication.92')
! B! z+ h) S u File "C:\Program Files\Python310\lib\site-packages\win32com\client\__init__.py", line 117, in Dispatch
2 s d% Z( t1 j. f, `5 d* ? dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch, userName, clsctx)
9 P$ c- a) U3 t* _* t1 f File "C:\Program Files\Python310\lib\site-packages\win32com\client\dynamic.py", line 106, in _GetGoodDispatchAndUserName: d: I' z( l7 r4 G3 j4 A
return (_GetGoodDispatch(IDispatch, clsctx), userName)
9 |' E F h% X File "C:\Program Files\Python310\lib\site-packages\win32com\client\dynamic.py", line 88, in _GetGoodDispatch
7 c8 h1 V* f+ P IDispatch = pythoncom.CoCreateInstance(
! X0 t; R; d0 w6 H, o- n) w7 {pywintypes.com_error: (-2147221005, '無效的類別字串', None, None)
) j2 b6 y; W4 a5 K1 S/ b/ B; c2 }8 |% r D' c& f
y) o2 A7 l/ d0 i/ v3 F# a+ T
我是VX2.7
; N# @8 S- g7 _" k/ m/ ?' n+ z4 c/ X# W$ J5 t
|
|