Results 1 to 8 of 8

Thread: OLE error

  1. #1
    Junior Member
    Join Date
    Oct 2015
    Posts
    14

    OLE error

    I call ZEN blue objects from Python. Since we upgraded to the newest ZEN blue version, we are getting the following error message:
    com_error: (-2146233079, 'OLE error 0x80131509', (0, None, u'This type has a ComVisible(false) parent in its hierarchy, therefore QueryInterface calls for IDispatch or class interfaces are disallowed.', None, 0, -2146233079), None)
    when trying to access a hardware component.
    We unregistered / registered the dlls after the software upgrade. We did not change our code and it worked before.
    Any idea what is going on?

  2. #2
    What exact ZEN Version did you use? The latest is ZEN 2.6 HF2.

  3. #3
    Junior Member
    Join Date
    Oct 2015
    Posts
    14
    Our IT department looked at the registry and discovered the following issues:
    The ZEN blue dlls point to two versions (2.6.18298.1 and 2.6.18345.1) of ZEN in the Classes Root Registry
    There are two copies of ZEN dlls on the C: drive. The dlls were modified at different dates.
    Some .tlb files are being created for both versions because of dll conflicts.

  4. #4
    CZ Administrators Carl Zeiss Microscopy 3's Avatar
    Join Date
    Jan 2013
    Posts
    388
    The ZEN blue dlls point to two versions of ZEN in the Classes Root Registry
    What you want to express most probably is the situation that there are two entries in the registry pointing at different DLLs of ZEN.

    This usually happens when the DLLs of the first version of ZEN, that are registered [via regasm], are not unregistered [/u] before the DLLs of the second version of ZEN are registered.

  5. #5
    Junior Member
    Join Date
    Oct 2015
    Posts
    14
    How do I get rid of the unwanted entry?

  6. #6
    CZ Administrators Carl Zeiss Microscopy 3's Avatar
    Join Date
    Jan 2013
    Posts
    388
    How do I get rid of the unwanted entry?
    To get rid of the unwanted entries I would recommend the following steps:

    1. unregister the current version with 'regasm /u'
    2. Start 'regedit.exe',
      mark the top node 'Computer' in the tree on the left hand side,
      in the menu select 'Edit, Find' and search for 'ZenWrapperLM',
      disable 'search for whole string',
      press 'Find' or [F3] to find the entries one by one.
      For each found entry the containing node is marked in the tree. I always (except 'Find'-node) delete this node.
    3. When the registry does not contain entries with 'ZenWrapperLM' any more, register the current version with 'regasm'.


    Now you should be on the 'save side'
    Last edited by Carl Zeiss Microscopy 3; 02-06-2019 at 10:43 AM.

  7. #7
    Junior Member
    Join Date
    Oct 2015
    Posts
    14

    Still getting com_error

    Unfortunately, this approach did not work. In addition I used PowerShell and removed all other old registry entries.
    I am still getting the error:
    com_error: (-2146233079, 'OLE error 0x80131509', (0, None, u'This type has a ComVisible(false) parent in its hierarchy, therefore QueryInterface calls for IDispatch or class interfaces are disallowed.', None, 0, -2146233079), None)

    I believe it happens when calling the Devices object:
    * >>> self
    <__main__.connectMicroscope instance at 0x000000000BF446C8>
    * >>> self.Zen
    <COMObject Zeiss.Micro.Scripting.ZenWrapperLM>
    * >>> self.Zen.Devices
    Traceback (most recent call last):
    File "D:\Users\winfriedw.ALLENINST\.p2\pool\plugins\org .python.pydev.core_7.0.3.201811082356\pysrc\_pydev d_bundle\pydevd_exec.py", line 3, in Exec
    exec exp in global_vars, local_vars
    File "<console>", line 1, in <module>
    File "D:\Automation\Anaconda\envs\microscope_automation \lib\site-packages\win32com\client\dynamic.py", line 516, in __getattr__
    ret = self._oleobj_.Invoke(retEntry.dispid,0,invoke_type ,1)
    com_error: (-2146233079, 'OLE error 0x80131509', (0, None, u'This type has a ComVisible(false) parent in its hierarchy, therefore QueryInterface calls for IDispatch or class interfaces are disallowed.', None, 0, -2146233079), None)

  8. #8
    CZ Administrators Carl Zeiss Microscopy 3's Avatar
    Join Date
    Jan 2013
    Posts
    388
    The problems mentioned will be solved when installing Zen 2.6 HF5 (to be released soon ;-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •