Hi, I am new to Streamlit Community. I am facing a problem while deploying my app.
Traceback:
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.__dict__)File "/mount/src/naf-bots/Script.py", line 2, in <module>
from PyPDF2 import PdfReader
I tried with many existing solutions from community,
I check my requirement.txt file. I included PyPDF2 with its latest version, but I don’t know why package is not installing while deploying.
I update requirement.txt file in local folders and github repo too, and reboot the app but same error occurs.
My app link: https://naf-chat.streamlit.app/
My Github Repository link: GitHub - Naf-byte/Naf-Bots: This repository serves as the central hub for all chatbot projects developed by me. It hosts a collection of innovative and functional chatbots designed to assist users in various tasks. From PDF analysis to natural language processing, explore a diverse range of conversational AI applications in NafayBot Central.
The content of my requiremen.txt is below:
streamlit==0.89.0
PyPDF2==1.26.0
langchain==0.1.0
Yes, I have updated, and when I tried to reboot the app. It appear the following error
Traceback (most recent call last):
File "/home/adminuser/venv/bin/streamlit", line 5, in <module>
from streamlit.cli import main
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/__init__.py", line 75, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/delta_generator.py", line 70, in <module>
from streamlit.elements.arrow import ArrowMixin
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/elements/arrow.py", line 15, in <module>
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.11/collections/__init__.py)
I tried the solution (importing iterable from collection.abc), but nothing works
import collections.abc
from collections.abc import Iterable
Manually create aliases for the classes expected by the third-party library
collections.Iterable = collections.abc.Iterable
collections.Mapping = collections.abc.Mapping
collections.MutableSet = collections.abc.MutableSet
collections.MutableMapping = collections.abc.MutableMapping
Can you suggest me what can I do to resolve this? Below is the streamlit error
Traceback (most recent call last):
File "/home/adminuser/venv/bin/streamlit", line 5, in <module>
from streamlit.cli import main
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/__init__.py", line 75, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/delta_generator.py", line 70, in <module>
from streamlit.elements.arrow import ArrowMixin
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/elements/arrow.py", line 15, in <module>
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.11/collections/__init__.py)
[08:11:34] ❗️ Streamlit server consistently failed status checks
Goyo
May 6, 2024, 8:34am
6
You need to do that before importing streamlit. Or maybe better, use a recent version of streamlit.
system
Closed
May 8, 2024, 3:30pm
8
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.