[python-win32] Pywin32 without the interface

Tim Roberts timr at probo.com
Fri Dec 2 15:09:34 EST 2022


On 12/2/22 4:25 AM, QMUL_EECS DVS wrote:

>
> Thanks for replying. Apologies for my vague question, let me see if I 
> can rephrase: I want to run pywin inside an aws instance, which only 
> allows for command line interface.
>
> Currently I can use pywin in my local machine, but it needs to open 
> Visio and Word windows. However, in the aws instance it throws an error:
> ‘ Traceback (most recent call last):
>
> File "C:\Program 
> Files\Python37\lib\site-packages\win32com\client\dynamic.py", line 86, 
> in _GetGoodDispatch
>
> IDispatch = pythoncom.connect(IDispatch)
>
> pywintypes.com_error: (-2147221021, 'Operation unavailable', None, None)
>
> ...
>
> File "C:\Program 
> Files\Python37\lib\site-packages\win32com\client\dynamic.py", line 89, 
> in _GetGoodDispatch
>
> IDispatch, None, clsctx, pythoncom.IID_IDispatch
>
> pywintypes.com_error: (-2147024891, 'Access is denied.', None, None)’
>
> Is it related to the fact that I can’t open Visio/ Word windows? If 
> so, is there a way for me to avoid this error?
>
The first and most obvious question is, do you actually have Office and 
Visio installed on your AWS instance?  How did you do that without a 
UI?  Launching Word like this usually does not bring up a UI window 
unless you specifically set "xxx.Visible = True", so I'm guessing 
there's something else going on.

-- 
Tim Roberts,timr at probo.com
Providenza & Boekelheide, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-win32/attachments/20221202/81de4630/attachment.html>


More information about the python-win32 mailing list