On Mar 6, 2021, at 6:43 AM, Marius Cirsta <mfor...@gmail.com> wrote:
> 
>  I'm trying to automate CANoe using win32com. I've written a script that 
> works perfectly when I log in and run it as a normal user.
> ...
> When being run as a service though I get this error:
> 
> Traceback (most recent call last):
>   File "D:\Jenkins\Scripts\dispatch.py", line 203, in <module>
>     exec_test(PDConfigPath, "CommonTests", "PD_CSB")
>   File "D:\Jenkins\Scripts\dispatch.py", line 146, in exec_test
>     win32com.client.WithEvents(csbTstMod, TestModuleEvents)
>   File "C:\Program 
> Files\Python39\lib\site-packages\win32com\client\__init__.py", line 336, in 
> WithEvents
>     instance = result_class(disp) # This only calls the first base class 
> __init__.
>   File 
> "C:\WINDOWS\TEMP\gen_py\3.9\7F31DEB0-5BCC-11D3-8562-00105A3E017Bx0x1x58.py", 
> line 19507, in __init__
>     cookie=cp.Advise(win32com.server.util.wrap(self, 
> usePolicy=EventHandlerPolicy))
> pywintypes.com_error: (-2147024891, 'Access is denied.', None, None)

Do you have your service configured to run as your user?  The normal service 
user has different access permissions, so it can’t access your file shares.
— 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to