xpra icon
Bug tracker and wiki

Opened 11 days ago

Closed 6 days ago

#1899 closed defect (wontfix)

comtypes runtime error with python 3 packaging

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: minor Milestone: 2.4
Component: packaging Version: 2.3.x
Keywords: Cc:

Description

And it's broken again. comtypes 1.1.5

Related tickets and changesets fixing comtypes problems:

  • r18797 + r18798: never include "gen" directory
  • r18796 + r14343: silence comtypes, use XPRA_SILENCE_COMTYPES=0 to show diagnostics
  • r18790: the network query code that is now broken
  • with python 2.7 (OK):
    Could not import comtypes.gen, trying to create it.
    Creating comtypes.gen package failed: [Error 3] The system cannot find the path specified: 'C:\\Program Files\\Xpra\\library.zip\\comtypes\\gen'
    Created a memory-only package.
    Creating writeable comtypes cache directory: 'c:\users\win7pr~1\appdata\local\temp\comtypes_cache\Xpra_cmd-27'
    Using writeable comtypes cache directory: 'c:\users\win7pr~1\appdata\local\temp\comtypes_cache\Xpra_cmd-27'
    Could not import comtypes.gen._565783C6_CB41_11D1_8B02_00600806D9B6_0_1_2: No module named _565783C6_CB41_11D1_8B02_00600806D9B6_0_1_2
    # Generating comtypes.gen._565783C6_CB41_11D1_8B02_00600806D9B6_0_1_2
    Could not import comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0: No module named _00020430_0000_0000_C000_000000000046_0_2_0
    # Generating comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0
    Could not import comtypes.gen.stdole: No module named stdole
    # Generating comtypes.gen.stdole
    Could not import comtypes.gen.WbemScripting: No module named WbemScripting
    # Generating comtypes.gen.WbemScripting
    
  • with python 3.6:
    Could not import comtypes.gen, trying to create it.
    Creating comtypes.gen package failed: [WinError 5] Access is denied: 'C:\\Program Files\\Xpra\\lib\\comtypes\\gen'
    Created a memory-only package.
    Creating writeable comtypes cache directory: 'C:\Users\WIN7PR~1\AppData\Local\Temp\comtypes_cache\Xpra_cmd-36'
    Using writeable comtypes cache directory: 'C:\Users\WIN7PR~1\AppData\Local\Temp\comtypes_cache\Xpra_cmd-36'
    Could not import comtypes.gen._565783C6_CB41_11D1_8B02_00600806D9B6_0_1_2: No module named 'comtypes.gen._565783C6_CB41_11D1_8B02_00600806D9B6_0_1_2'
    # Generating comtypes.gen._565783C6_CB41_11D1_8B02_00600806D9B6_0_1_2
    Could not import comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0: No module named 'comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0'
    # Generating comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0
    Could not import comtypes.gen.stdole: No module named 'comtypes.gen.stdole'
    # Generating comtypes.gen.stdole
    Error: failed to query network interface:
     No module named 'comtypes.gen.stdole'
    

Change History (2)

comment:1 Changed 11 days ago by Antoine Martin

Priority: majorminor
Status: newassigned

Exception details:

get_interface_info({97D5CC41-B8EA-4336-B147-F8227887A3A8})
Traceback (most recent call last):
  File "E:\Xpra\trunk\src/xpra/platform/win32/netdev_query.py", line 18, in get_interface_info
    o = CreateObject("WbemScripting.SWbemLocator")
  File "C:/msys32/mingw32/lib/python3.6/site-packages/comtypes-1.1.5-py3.6.egg/comtypes/client/__init__.py", line 250, in CreateObject
    return _manage(obj, clsid, interface=interface)
  File "C:/msys32/mingw32/lib/python3.6/site-packages/comtypes-1.1.5-py3.6.egg/comtypes/client/__init__.py", line 188, in _manage
    obj = GetBestInterface(obj)
  File "C:/msys32/mingw32/lib/python3.6/site-packages/comtypes-1.1.5-py3.6.egg/comtypes/client/__init__.py", line 112, in GetBestInterface
    interface = getattr(mod, itf_name)
AttributeError: module 'comtypes.gen.WbemScripting' has no attribute 'ISWbemLocator'

The error does not occur on the 64-bit build system. No idea why.

comment:2 Changed 6 days ago by Antoine Martin

Resolution: wontfix
Status: assignedclosed

Not much we can do about this, just use 64-bit builds.

Note: See TracTickets for help on using tickets.