Firstly, I’m Brazilian, forgive me for my bad English.
Therefore, when I deploy my application through streamlit, an import error appears, saying that it is to prevent data leaks, and when I open the “manage app”, it shows the following message “ImportError: Missing optional dependency ‘openpyxl’. Use pip or conda to install openpyxl.”.
However, when I test the code on my local host, it works perfectly, does anyone know how to help me? I researched and even read forums here, and nothing solved it.
github link: GitHub - improdutividade/improdutividadeapp
streramlit link: https://pr0dutividade.streamlit.app
error: ImportError: 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/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 535, in _run_script
exec(code, module.dict)
File “/mount/src/improdutividadeapp/app.py”, line 136, in
registro.registrar_atividades_equipe()
File “/mount/src/improdutividadeapp/app.py”, line 28, in registrar_atividades_equipe
self.registrar_atividade(i)
File “/mount/src/improdutividadeapp/app.py”, line 61, in registrar_atividade
self.iniciar_atividade(funcionario_id, nome_funcao, atividade)
File “/mount/src/improdutividadeapp/app.py”, line 79, in iniciar_atividade
df = pd.read_excel(self.arquivo_dados)
File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/excel/_base.py”, line 504, in read_excel
io = ExcelFile(
File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/excel/_base.py”, line 1580, in init
self._reader = self._engines[engine](
File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/excel/_openpyxl.py”, line 552, in init
import_optional_dependency(“openpyxl”)
File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/compat/_optional.py”, line 135, in import_optional_dependency