ask-multiple-pdfs icon indicating copy to clipboard operation
ask-multiple-pdfs copied to clipboard

Not able to run the code

Open Vector-9974 opened this issue 1 year ago • 7 comments

(gitenvt) C:\Users\Work\Desktop\dataProcess\ask-multiple-pdfs>streamlit run app.py Traceback (most recent call last): File "", line 198, in run_module_as_main File "", line 88, in run_code File "C:\Users\Work\Desktop\dataProcess\gitenvt\Scripts\streamlit.exe_main.py", line 4, in File "C:\Users\Work\Desktop\dataProcess\gitenvt\Lib\site-packages\streamlit_init.py", line 55, in from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator File "C:\Users\Work\Desktop\dataProcess\gitenvt\Lib\site-packages\streamlit\delta_generator.py", line 43, in from streamlit.elements.arrow_altair import ArrowAltairMixin File "C:\Users\Work\Desktop\dataProcess\gitenvt\Lib\site-packages\streamlit\elements\arrow_altair.py", line 36, in from altair.vegalite.v4.api import Chart ModuleNotFoundError: No module named 'altair.vegalite.v4'

This is the error that is coming when running the streamlit run app.py

How to rectify it

Vector-9974 avatar May 31 '23 11:05 Vector-9974

I am assuming you are using Win. Search in Explorer the PythonXX/Scripts folder where you have app.py. and add streamlit with the full path in the System Variables.

dogg223405 avatar May 31 '23 14:05 dogg223405

Same problem with Delta generator and altair.vegalite Did you solve it?

DrJulioCid avatar Jun 01 '23 18:06 DrJulioCid

Im on Mac BTW

DrJulioCid avatar Jun 01 '23 18:06 DrJulioCid

from your shell run: pip install altair==4.2.2

source post talking about this bug/fix

justin-parker avatar Jun 02 '23 13:06 justin-parker

installing altair fixed the issue for me. But I ran into this error when processing a document ImportError: Could not import tiktoken python package. This is needed in order to for OpenAIEmbeddings. Please install it with pip install tiktoken.

image

Daniel-Trung-Nguyen avatar Jul 03 '23 01:07 Daniel-Trung-Nguyen

Hi there, Cannot get it work on macos.

`(python394) ╭─[email protected] ~/Library/CloudStorage/Dropbox/ask-multiple-pdfs-main
╰─➤ streamlit run app.py

Traceback (most recent call last): File "/Users/rho/.pyenv/versions/3.9.2/bin/streamlit", line 5, in from streamlit.web.cli import main File "/Users/rho/.pyenv/versions/3.9.2/lib/python3.9/site-packages/streamlit/init.py", line 55, in from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator File "/Users/rho/.pyenv/versions/3.9.2/lib/python3.9/site-packages/streamlit/delta_generator.py", line 43, in from streamlit.elements.arrow_altair import ArrowAltairMixin File "/Users/rho/.pyenv/versions/3.9.2/lib/python3.9/site-packages/streamlit/elements/arrow_altair.py", line 36, in from altair.vegalite.v4.api import Chart ModuleNotFoundError: No module named 'altair.vegalite.v4'`

I tryied 4.0.0 4.1 4.2 and 4.2.2 of altair and 1.18.1 and 1.22.1 of streamlit. Allways returns the same thing. Thanks in advance for the help.

rhoconlinux avatar Jul 08 '23 07:07 rhoconlinux

add 'altair==4.2.2' in requirements.txt and pip install -r requirements.txt. It worked for me, I'm using macOS.

prudhvi2934 avatar Jul 12 '23 20:07 prudhvi2934