<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>On 12/2/22 4:25 AM, QMUL_EECS DVS wrote:<br>
</p>
<blockquote type="cite"
cite="mid:CA+LmRRiM-VLVvpY3aREjSCtGxh7G_FiXK_eVObW4kGUJ7EgsjQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div><br>
<div dir="auto">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. </div>
<div dir="auto"><br>
</div>
<div dir="auto">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:</div>
<div dir="auto">‘<span
style="font-size:1rem;word-spacing:1px;color:rgb(49,49,49)"> Traceback
(most recent call last):</span></div>
<p class="MsoNormal"
style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">
File "C:\Program
Files\Python37\lib\site-packages\win32com\client\dynamic.py",
line 86, in _GetGoodDispatch</p>
<p class="MsoNormal"
style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">
IDispatch = pythoncom.connect(IDispatch)</p>
<p class="MsoNormal"
style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">pywintypes.com_error:
(-2147221021, 'Operation unavailable', None, None)</p>
<p class="MsoNormal"
style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">...</p>
<p class="MsoNormal"
style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">
File "C:\Program
Files\Python37\lib\site-packages\win32com\client\dynamic.py",
line 89, in _GetGoodDispatch</p>
<p class="MsoNormal"
style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">
IDispatch, None, clsctx, pythoncom.IID_IDispatch</p>
<p class="MsoNormal"
style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)"
dir="auto">pywintypes.com_error: (-2147024891, 'Access is
denied.', None, None)’</p>
<p class="MsoNormal"
style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)"
dir="auto">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?</p>
</div>
</blockquote>
<p>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.<br>
</p>
<pre class="moz-signature" cols="72">--
Tim Roberts, <a class="moz-txt-link-abbreviated" href="mailto:timr@probo.com">timr@probo.com</a>
Providenza & Boekelheide, Inc.</pre>
</body>
</html>