Error Deploying App - Win32

Hi everyone! I’m trying to deploy mi app on the cloud, and can’t get pass an error with “win32”, first i saw some solutions that said i needed to include it in my requirements as pypiwin32 == 223, but i got the following error:

Collecting pypiwin32==223
Downloading pypiwin32-223-py3-none-any.whl (1.7 kB)
ERROR: Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32) (from versions: none)
ERROR: No matching distribution found for pywin32>=223

Other solution was to directly remove it from the requirements.txt, but when it downloads all the requirements i get another error of module not found:

ModuleNotFoundError: ...

File "/app/sapautomation/SAPDownloadV02.py", line 8, in <module>
    import win32com.client as win32

Any solution will be much appreciated!!

1 Like

Hi @joaquinasensio,

Thanks for posting and welcome to the Streamlit community!

Can you provide a link to your code on GitHub for me to replicate the error?

In the mean time, try upgrading your pip using:

pip install --upgrade pip

Also, since win32com.client is part of pywin32, add pywin32 to your requirements.txt file.

Happy Streamlit-ing :balloon:

Hi @tonykip thanks for the quick reply, i’ve already upgraded pip. It didn’t make a difference.
Here is the link to my repository

Hi joaquinasensio,

Your repo is empty. You can also share you code on here.

Also, please check out our guidelines on how to post an effective question here.

Happy Streamlit-ing :balloon:

You may try again with this linkGitHub.
The code is quite long, but what I reckon to be the problem is the win32 library.
Sorry for the poorly constructed question, but as I said before any input would be much appreciated.

1 Like

I don’t think you can deploy that to Streamlit Cloud.

1 Like

Hi @joaquinasensio,

This seems to be an issue for many users as per their GitHub Issues.

It is catered for windows user as well and not mac.

This might not work with Streamlit at all.

Happy Streamlit-ing :balloon:

OLa, estou com o mesmo problema e não consigo resolver, só tenho um arquivo de requisito - requirements.txt.
vou colocar o erro e o link github se alguem puder me ajudar.
Primeiro contato com o streamlit.

ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).
Traceback:
File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 564, in _run_script
exec(code, module.dict)
File “/app/ia-jogos-da-copa/partida.py”, line 3, in
from scipy.stats import poisson

Hi @cientistafabiano,

Welcome to the Streamlit forum! :wave: :smile:

You’ve misspelled the file as requeriments.txt instead of requirements.txt. If you rename the file to requirements.txt, it should fix the ModuleNotFoundError.

Please ensure you only have Python packages in the requirements file. conda is probably not something you want to include…

Happy Streamlit-ing! :balloon:
Snehan

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.