[python-win32] Package giving Error while deploying to windows container
Tim Roberts
timr at probo.com
Wed May 18 19:13:20 EDT 2022
Ankit Sharma wrote:
> The issue with Pywin32 library is , it is getting deployed
> successfully to window container, However, once we try to use Export
> file function from the library , we get following error:
> ...
> File "C:\app\backend\manage_products\products.py", line 17751, in
> run_excel
> excel = win32.gencache.EnsureDispatch('Excel.Application')
> ...
> Exception Value: (-2147221005, 'Invalid class string', None, None)
>
>
> This is the log that we can not rectify even after updating our python
> version and changing container from Linux based environment to Windows
> Based environment.
>
> Can you please help us out in figuring this issue out! or can help us
> in suggesting if we can deploy this package in a Linux container.
> Anything works.
You are trying to run the Excel application. To do that, you have to
have Excel installed on the machine where you're running. And, of
course, nothing that uses Win32Com can ever work on Linux.
If you're trying to manipulate Excel files, there are many
cross-platform libraries to do that. If you really need to RUN Excel,
then it has to be on Windows, and you have to have Excel installed.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3389 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://mail.python.org/pipermail/python-win32/attachments/20220518/44fc5648/attachment.bin>
More information about the python-win32
mailing list