I have an issue importing the RPA.Outlook.Application library, when I am running the robot I get Error in file ‘C:\Robocorp2\TestEmail\tasks.robot’ on line 4: Importing library ‘RPA.Outlook.Application’ failed: ImportError: No system module ‘pywintypes’ (pywintypes39.dll).
I tried using pip install pywin32, but the same error comes up. The referenced .dll already exists in C:\Users\MYUSER\AppData\Local\robocorp\pkgs\pywin32-303-py39ha55989b_1\Lib\site-packages\pywin32_system32.
The rest of the error is:
Traceback (most recent call last):
File “c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\lib\site-packages\RPA\Outlook\Application.py”, line 14, in
import pywintypes
File “c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\lib\site-packages\win32\lib\pywintypes.py”, line 129, in
import_pywin32_system_module(“pywintypes”, globals())
File “c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\lib\site-packages\win32\lib\pywintypes.py”, line 110, in import_pywin32_system_module
raise ImportError(“No system module ‘%s’ (%s)” % (modname, filename))
PYTHONPATH:
c:\Robocorp2\TestEmail
c:\Users\MYCODE.vscode\extensions\robocorp.robotframework-lsp-1.7.0\src\robotframework_debug_adapter
c:\Robocorp2\TestEmail
c:\Users\PW492FG.vscode\extensions\robocorp.robotframework-lsp-1.7.0\src
c:\Users\PW492FG.vscode\extensions\robocorp.robotframework-lsp-1.7.0\src\robotframework_ls\vendored
c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\python39.zip
c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\DLLs
c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\lib
c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041
c:\ProgramData\robocorp\ht
c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\lib\site-packages
c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\lib\site-packages\win32
c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\lib\site-packages\win32\lib
c:\ProgramData\robocorp\ht\a79cfb6_b1f3c24_1c0bc041\lib\site-packages\Pythonwin
I tried copying the pywintypes39.dll file over to one of those directories but it did not work.