You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$HOME/Pdf-GPT/.venv/lib/python3.10/site-packages/langchain/vectorstores/init.py:35: LangChainDeprecationWarning: Importing vector stores from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:
from langchain_community.vectorstores import Chroma.
To install langchain-community run pip install -U langchain-community.
warnings.warn(
$HOME//Documents/Pdf-GPT/.venv/lib/python3.10/site-packages/langchain/chat_models/init.py:31: LangChainDeprecationWarning: Importing chat models from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:
from langchain_community.chat_models import ChatOpenAI.
To install langchain-community run pip install -U langchain-community.
warnings.warn(
$HOME//Documents/Pdf-GPT/.venv/lib/python3.10/site-packages/langchain/document_loaders/init.py:36: LangChainDeprecationWarning: Importing document loaders from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:
from langchain_community.document_loaders import PyPDFLoader.
To install langchain-community run pip install -U langchain-community.
warnings.warn(
Traceback (most recent call last):
File "$HOME//Documents/Pdf-GPT/app.py", line 11, in
import fitz
File "$HOME//Documents/Pdf-GPT/.venv/lib/python3.10/site-packages/fitz/init.py", line 1, in
from frontend import *
ModuleNotFoundError: No module named 'frontend'
Changed to 3.11.7:
The frontend error went away but now replaced with:
Traceback (most recent call last):
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/gradio/routes.py", line 401, in run_predict
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 1302, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 1039, in call_function
prediction = await anyio.to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/gradio/utils.py", line 491, in async_iteration
return next(iterator)
^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/app.py", line 78, in get_response
chain = app(file)
^^^^^^^^^
File "$HOME/Pdf-GPT/app.py", line 44, in call
self.chain = self.build_chain(file)
^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/app.py", line 67, in build_chain
pdfsearch = Chroma.from_documents(documents, embeddings, collection_name= file_name,)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/langchain/vectorstores/chroma.py", line 347, in from_documents
return cls.from_texts(
^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/langchain/vectorstores/chroma.py", line 308, in from_texts
chroma_collection = cls(
^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/langchain/vectorstores/chroma.py", line 91, in init
self._collection = self._client.get_or_create_collection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/chromadb/api/local.py", line 80, in get_or_create_collection
return self.create_collection(name, metadata, embedding_function, get_or_create=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/chromadb/api/local.py", line 67, in create_collection
check_index_name(name)
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/chromadb/api/local.py", line 42, in check_index_name
raise ValueError(msg)
ValueError: Expected collection name that (1) contains 3-63 characters, (2) starts and ends with an alphanumeric character, (3) otherwise contains only alphanumeric characters, underscores or hyphens (-), (4) contains no two consecutive periods (..) and (5) is not a valid IPv4 address, got Screenshot_sample.pdf
Changed to screenshot_sample.pdf file name:
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/numpy/lib/function_base.py", line 550, in average
raise ZeroDivisionError(
ZeroDivisionError: Weights sum to zero, can't be normalized
The text was updated successfully, but these errors were encountered:
gradio app.py
$HOME/Pdf-GPT/.venv/lib/python3.10/site-packages/langchain/vectorstores/init.py:35: LangChainDeprecationWarning: Importing vector stores from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:
from langchain_community.vectorstores import Chroma
.To install langchain-community run
pip install -U langchain-community
.warnings.warn(
$HOME//Documents/Pdf-GPT/.venv/lib/python3.10/site-packages/langchain/chat_models/init.py:31: LangChainDeprecationWarning: Importing chat models from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:
from langchain_community.chat_models import ChatOpenAI
.To install langchain-community run
pip install -U langchain-community
.warnings.warn(
$HOME//Documents/Pdf-GPT/.venv/lib/python3.10/site-packages/langchain/document_loaders/init.py:36: LangChainDeprecationWarning: Importing document loaders from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:
from langchain_community.document_loaders import PyPDFLoader
.To install langchain-community run
pip install -U langchain-community
.warnings.warn(
Traceback (most recent call last):
File "$HOME//Documents/Pdf-GPT/app.py", line 11, in
import fitz
File "$HOME//Documents/Pdf-GPT/.venv/lib/python3.10/site-packages/fitz/init.py", line 1, in
from frontend import *
ModuleNotFoundError: No module named 'frontend'
pip list
Package Version
aiofiles 23.2.1
aiohttp 3.9.1
aiosignal 1.3.1
altair 5.2.0
annotated-types 0.6.0
anyio 4.2.0
asgiref 3.7.2
async-timeout 4.0.3
attrs 23.2.0
backoff 2.2.1
bcrypt 4.1.2
build 1.0.3
cachetools 5.3.2
certifi 2023.11.17
charset-normalizer 3.3.2
chroma-hnswlib 0.7.3
chromadb 0.4.22
ci-info 0.3.0
click 8.1.7
colorama 0.4.6
coloredlogs 15.0.1
configobj 5.0.8
configparser 6.0.0
contourpy 1.2.0
cycler 0.12.1
dataclasses-json 0.6.3
Deprecated 1.2.14
etelemetry 0.3.1
exceptiongroup 1.2.0
fastapi 0.109.0
ffmpy 0.3.1
filelock 3.13.1
fitz 0.0.1.dev2
flatbuffers 23.5.26
fonttools 4.47.2
frozenlist 1.4.1
fsspec 2023.12.2
future 0.18.3
google-auth 2.26.2
googleapis-common-protos 1.62.0
gradio 4.14.0
gradio_client 0.8.0
greenlet 3.0.3
grpcio 1.60.0
h11 0.14.0
httpcore 1.0.2
httplib2 0.22.0
httptools 0.6.1
httpx 0.26.0
huggingface-hub 0.20.2
humanfriendly 10.0
idna 3.6
importlib-metadata 6.11.0
importlib-resources 6.1.1
isodate 0.6.1
Jinja2 3.1.3
jsonpatch 1.33
jsonpointer 2.4
jsonschema 4.20.0
jsonschema-specifications 2023.12.1
kiwisolver 1.4.5
kubernetes 29.0.0
langchain 0.1.0
langchain-community 0.0.12
langchain-core 0.1.10
langsmith 0.0.80
looseversion 1.3.0
lxml 5.1.0
markdown-it-py 3.0.0
MarkupSafe 2.1.3
marshmallow 3.20.2
matplotlib 3.8.2
mdurl 0.1.2
mmh3 4.1.0
monotonic 1.6
mpmath 1.3.0
multidict 6.0.4
mypy-extensions 1.0.0
networkx 3.2.1
nibabel 5.2.0
nipype 1.8.6
numpy 1.26.3
oauthlib 3.2.2
onnxruntime 1.16.3
opentelemetry-api 1.22.0
opentelemetry-exporter-otlp-proto-common 1.22.0
opentelemetry-exporter-otlp-proto-grpc 1.22.0
opentelemetry-instrumentation 0.43b0
opentelemetry-instrumentation-asgi 0.43b0
opentelemetry-instrumentation-fastapi 0.43b0
opentelemetry-proto 1.22.0
opentelemetry-sdk 1.22.0
opentelemetry-semantic-conventions 0.43b0
opentelemetry-util-http 0.43b0
orjson 3.9.10
overrides 7.4.0
packaging 23.2
pandas 2.1.4
pathlib 1.0.1
pillow 10.2.0
pip 22.2.2
posthog 3.3.1
protobuf 4.25.2
prov 2.0.0
pulsar-client 3.4.0
pyasn1 0.5.1
pyasn1-modules 0.3.0
pydantic 2.5.3
pydantic_core 2.14.6
pydot 2.0.0
pydub 0.25.1
Pygments 2.17.2
pyparsing 3.1.1
PyPika 0.48.9
pyproject_hooks 1.0.0
python-dateutil 2.8.2
python-dotenv 1.0.0
python-multipart 0.0.6
pytz 2023.3.post1
pyxnat 1.6
PyYAML 6.0.1
rdflib 7.0.0
referencing 0.32.1
requests 2.31.0
requests-oauthlib 1.3.1
rich 13.7.0
rpds-py 0.17.1
rsa 4.9
scipy 1.11.4
semantic-version 2.10.0
setuptools 63.2.0
shellingham 1.5.4
simplejson 3.19.2
six 1.16.0
sniffio 1.3.0
SQLAlchemy 2.0.25
starlette 0.35.1
sympy 1.12
tenacity 8.2.3
tokenizers 0.15.0
tomli 2.0.1
tomlkit 0.12.0
toolz 0.12.0
tqdm 4.66.1
traits 6.3.2
typer 0.9.0
typing_extensions 4.9.0
typing-inspect 0.9.0
tzdata 2023.4
urllib3 2.1.0
uvicorn 0.25.0
uvloop 0.19.0
watchfiles 0.21.0
websocket-client 1.7.0
websockets 11.0.3
wrapt 1.16.0
yarl 1.9.4
zipp 3.17.0
python -V
Python 3.10.7
Changed to 3.11.7:
The frontend error went away but now replaced with:
Traceback (most recent call last):
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/gradio/routes.py", line 401, in run_predict
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 1302, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 1039, in call_function
prediction = await anyio.to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/gradio/utils.py", line 491, in async_iteration
return next(iterator)
^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/app.py", line 78, in get_response
chain = app(file)
^^^^^^^^^
File "$HOME/Pdf-GPT/app.py", line 44, in call
self.chain = self.build_chain(file)
^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/app.py", line 67, in build_chain
pdfsearch = Chroma.from_documents(documents, embeddings, collection_name= file_name,)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/langchain/vectorstores/chroma.py", line 347, in from_documents
return cls.from_texts(
^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/langchain/vectorstores/chroma.py", line 308, in from_texts
chroma_collection = cls(
^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/langchain/vectorstores/chroma.py", line 91, in init
self._collection = self._client.get_or_create_collection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/chromadb/api/local.py", line 80, in get_or_create_collection
return self.create_collection(name, metadata, embedding_function, get_or_create=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/chromadb/api/local.py", line 67, in create_collection
check_index_name(name)
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/chromadb/api/local.py", line 42, in check_index_name
raise ValueError(msg)
ValueError: Expected collection name that (1) contains 3-63 characters, (2) starts and ends with an alphanumeric character, (3) otherwise contains only alphanumeric characters, underscores or hyphens (-), (4) contains no two consecutive periods (..) and (5) is not a valid IPv4 address, got Screenshot_sample.pdf
Changed to screenshot_sample.pdf file name:
File "$HOME/Pdf-GPT/.venv/lib/python3.11/site-packages/numpy/lib/function_base.py", line 550, in average
raise ZeroDivisionError(
ZeroDivisionError: Weights sum to zero, can't be normalized
The text was updated successfully, but these errors were encountered: