Gemini PDF Chatbot: A Streamlit-based application powered by the Gemini conversational AI model. Upload multiple PDF files, extract text, and engage in natural language conversations to receive detailed responses based on the document context. Enhance your interaction with PDF documents using this intuitive and intelligent chatbot.
NameError: name 'xrange' is not defined
Traceback:
File "/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.dict)
File "/root/gemini_multipdf_chat/app.py", line 2, in
from PyPDF2 import PdfReader
File "/usr/local/lib/python3.11/dist-packages/PyPDF2/init.py", line 12, in
from ._encryption import PasswordType
File "/usr/local/lib/python3.11/dist-packages/PyPDF2/_encryption.py", line 60, in
from Crypto.Cipher import AES, ARC4 # type: ignore[import]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/Crypto/Cipher/ARC4.py", line 119, in
key_size = xrange(1,256+1)
^^^^^^
NameError: name 'xrange' is not defined Traceback: File "/usr/local/lib/python3.11/dist-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script exec(code, module.dict) File "/root/gemini_multipdf_chat/app.py", line 2, in
from PyPDF2 import PdfReader
File "/usr/local/lib/python3.11/dist-packages/PyPDF2/init.py", line 12, in
from ._encryption import PasswordType
File "/usr/local/lib/python3.11/dist-packages/PyPDF2/_encryption.py", line 60, in
from Crypto.Cipher import AES, ARC4 # type: ignore[import]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/Crypto/Cipher/ARC4.py", line 119, in
key_size = xrange(1,256+1)
^^^^^^