vanna-ai / vanna

🤖 Chat with your SQL database 📊. Accurate Text-to-SQL Generation via LLMs using RAG 🔄.
https://vanna.ai/docs/
MIT License
9.36k stars 691 forks source link

Error while using Ollama with version 0.5.0 #398

Open RodolfoMontenegro opened 2 months ago

RodolfoMontenegro commented 2 months ago

Describe the bug Error while running the flask app in jupyter notebook

To Reproduce Steps to reproduce the behavior: pip install 'vanna[chromadb,postgres,ollama]' from vanna.flask import VannaFlaskApp app = VannaFlaskApp(vn) app.run()

Expected behavior Open app at localhost:8084

Error logs/Screenshots Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/pc01/.local/lib/python3.10/site-packages/ipykernel_launcher.py", line 18, in app.launch_new_instance() File "/home/pc01/.local/lib/python3.10/site-packages/traitlets/config/application.py", line 1074, in launch_instance app.initialize(argv) File "/home/pc01/.local/lib/python3.10/site-packages/traitlets/config/application.py", line 118, in inner return method(app, *args, **kwargs) File "/home/pc01/.local/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 692, in initialize self.init_sockets() File "/home/pc01/.local/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 331, in init_sockets self.shell_port = self._bind_socket(self.shell_socket, self.shell_port) File "/home/pc01/.local/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 253, in _bind_socket return self._try_bind_socket(s, port) File "/home/pc01/.local/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 229, in _try_bind_socket s.bind("tcp://%s:%i" % (self.ip, port)) File "/home/pc01/.local/lib/python3.10/site-packages/zmq/sugar/socket.py", line 311, in bind super().bind(addr) File "_zmq.py", line 898, in zmq.backend.cython._zmq.Socket.bind File "_zmq.py", line 160, in zmq.backend.cython._zmq._check_rc zmq.error.ZMQError: Address already in use (addr='tcp://127.0.0.1:41893')

An exception has occurred, use %tb to see the full traceback.

SystemExit: 1

/home/pc01/.local/lib/python3.10/site-packages/IPython/core/interactiveshell.py:3585: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

Desktop (please complete the following information where):

vaultagegroup commented 2 months ago

I got the same when I updated from 0.43 to 0.50

RodolfoMontenegro commented 2 months ago

I got the same when I updated from 0.43 to 0.50

I tried to run in through the jupyter notebook and gave me that error. What solved it in my case @vaultagegroup is create the *.py file, and run it in terminal as python3 my_file.py

I hope that works for you!

marszhang-sha commented 1 month ago

got the same error. OS: [MAC 14.4.1 ] vanna: [0.5.4]

Traceback (most recent call last):
  File "/usr/local/anaconda3/envs/vanna/lib/python3.9/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/usr/local/anaconda3/envs/vanna/lib/python3.9/site-packages/traitlets/config/application.py", line 1074, in launch_instance
    app.initialize(argv)
  File "/usr/local/anaconda3/envs/vanna/lib/python3.9/site-packages/traitlets/config/application.py", line 118, in inner
    return method(app, *args, **kwargs)
  File "/usr/local/anaconda3/envs/vanna/lib/python3.9/site-packages/ipykernel/kernelapp.py", line 692, in initialize
    self.init_sockets()
  File "/usr/local/anaconda3/envs/vanna/lib/python3.9/site-packages/ipykernel/kernelapp.py", line 331, in init_sockets
    self.shell_port = self._bind_socket(self.shell_socket, self.shell_port)
  File "/usr/local/anaconda3/envs/vanna/lib/python3.9/site-packages/ipykernel/kernelapp.py", line 253, in _bind_socket
    return self._try_bind_socket(s, port)
  File "/usr/local/anaconda3/envs/vanna/lib/python3.9/site-packages/ipykernel/kernelapp.py", line 229, in _try_bind_socket
    s.bind("tcp://%s:%i" % (self.ip, port))
  File "/usr/local/anaconda3/envs/vanna/lib/python3.9/site-packages/zmq/sugar/socket.py", line 311, in bind
    super().bind(addr)
  File "_zmq.py", line 898, in zmq.backend.cython._zmq.Socket.bind
  File "_zmq.py", line 160, in zmq.backend.cython._zmq._check_rc
zmq.error.ZMQError: Address already in use (addr='tcp://127.0.0.1:59935')
An exception has occurred, use %tb to see the full traceback.

SystemExit: 1
/usr/local/anaconda3/envs/vanna/lib/python3.9/site-packages/IPython/core/interactiveshell.py:3558: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
  warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)