Bugs item #1228069, was opened at 2005-06-27 09:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1228069&group_id=78018
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: win32
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: mkuner (mkuner)
Assigned to: Nobody/Anonymous (nobody)
Summary: makepy generates error during import LabVIEW TLB
Initial Comment:
System: XP Pro SP1
LabVIEW 7.1
the following code generates an error (see below code)
comment from M.Hammond:
>>
"D:\Python24\Lib\site-packages\win32com\client\makepy.py",
>> line 306, in GenerateChildFromTypeLibSpec
>> __import__("win32com.gen_py." + dir_name + "." +
child)
>> ImportError: No module named _Iapplication
>
>That is probably a bug related to tracking down
dependent typelibs. Maybe you could add an entry at
sourceforge?
------- Code start
---------------------------------------------
import win32com.client
oLv =
win32com.client.gencache.EnsureDispatch("LabView.Application")
oViTest =
oLv.GetVIReference("D:\Projects\py.lv.test\pytest.vi","",True)
oViTest._FlagAsMethod("Call") # as
proposed from M.Hammond
bError = True # to
preset list object
strResult = "" # to
preset list object
arParNames = ["strEntry","strOutput","bError"] #
first and second are strings, third is bool
arParVals = ["Hello World", strResult, bError] #
first input, second+third output
result = oViTest.Call(arParNames,arParVals) # call VI
print result # show
changed (OUT) values
del oViLogPrint #
release link to LabVIEW VI (necessary !!)
--------- Code End
--------------------------------------------
Traceback (most recent call last):
File
"D:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
exec codeObject in __main__.__dict__
File "D:\Projects\py.lv.test\py-lv-example.py", line
3, in ?
oLv =
win32com.client.gencache.EnsureDispatch("LabView.Application")
File
"D:\Python24\Lib\site-packages\win32com\client\gencache.py",
line 529, in EnsureDispatch
disp = win32com.client.Dispatch(prog_id)
File
"D:\Python24\Lib\site-packages\win32com\client\__init__.py",
line 96, in Dispatch
return __WrapDispatch(dispatch, userName,
resultCLSID, typeinfo, UnicodeToString, clsctx)
File
"D:\Python24\Lib\site-packages\win32com\client\__init__.py",
line 38, in __WrapDispatch
klass = gencache.GetClassForCLSID(resultCLSID)
File
"D:\Python24\Lib\site-packages\win32com\client\gencache.py",
line 179, in GetClassForCLSID
mod = GetModuleForCLSID(clsid)
File
"D:\Python24\Lib\site-packages\win32com\client\gencache.py",
line 240, in GetModuleForCLSID
makepy.GenerateChildFromTypeLibSpec(sub_mod, info)
File
"D:\Python24\Lib\site-packages\win32com\client\makepy.py",
line 306, in GenerateChildFromTypeLibSpec
__import__("win32com.gen_py." + dir_name + "." + child)
ImportError: No module named _IApplication
----------------------------------------------------------------------
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1228069&group_id=78018
|