Canner / WrenAI

🚀 Open-source SQL AI Agent for Text-to-SQL. Make Text2SQL Easy! 🙌
https://getwren.ai/oss
GNU Affero General Public License v3.0
1.73k stars 155 forks source link

Ibis server error #587

Closed johnfelipe closed 1 month ago

johnfelipe commented 1 month ago

https://github.com/user-attachments/assets/f6674e53-5483-42be-b79a-16bab179a63c

Ibis server error
('08001', '[08001] [FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)')

and chrome console:

[ContentMain]
ContentMain.js:18 [ContentService] document.readyState: loading
ContentMain.js:5 [ContentService.SetContentInitData] target: { TabId: 623186767, FrameId: 0}
chrome-extension://a…ih/draggable.js:190 Uncaught SyntaxError: Unexpected token 'export'
chrome-extension://a…khih/recorder.js:41 Uncaught SyntaxError: Unexpected token 'export'
_app-9913c592ab103105.js:6 PostHog initialized.
index.js:103 Download the Apollo DevTools for a better development experience: https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm
index.js:103 ApolloError
    at new t (_app-9913c592ab103105.js:25:1620)
    at _app-9913c592ab103105.js:6:910382
    at a (_app-9913c592ab103105.js:6:881735)
    at _app-9913c592ab103105.js:6:881650
    at new Promise (<anonymous>)
    at Object.then (_app-9913c592ab103105.js:6:881617)
    at Object.next (_app-9913c592ab103105.js:6:881745)
    at oO (_app-9913c592ab103105.js:6:839830)
    at ok (_app-9913c592ab103105.js:6:840378)
    at t.next (_app-9913c592ab103105.js:6:840886)
(anónimo) @ index.js:103
Mostrar 1 marco más
Mostrar menos

and in log of docker:

2024-08-08 10:25:14 ibis-server-1      | During handling of the above exception, another exception occurred:
2024-08-08 10:25:14 ibis-server-1      | 
2024-08-08 10:25:14 ibis-server-1      | Traceback (most recent call last):
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
2024-08-08 10:25:14 ibis-server-1      |     result = await app(  # type: ignore[func-returns-value]
2024-08-08 10:25:14 ibis-server-1      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
2024-08-08 10:25:14 ibis-server-1      |     return await self.app(scope, receive, send)
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
2024-08-08 10:25:14 ibis-server-1      |     await super().__call__(scope, receive, send)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
2024-08-08 10:25:14 ibis-server-1      |     await self.middleware_stack(scope, receive, send)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
2024-08-08 10:25:14 ibis-server-1      |     raise exc
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
2024-08-08 10:25:14 ibis-server-1      |     await self.app(scope, receive, _send)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
2024-08-08 10:25:14 ibis-server-1      |     with collapse_excgroups():
2024-08-08 10:25:14 ibis-server-1      |   File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
2024-08-08 10:25:14 ibis-server-1      |     self.gen.throw(typ, value, traceback)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
2024-08-08 10:25:14 ibis-server-1      |     raise exc
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
2024-08-08 10:25:14 ibis-server-1      |     response = await self.dispatch_func(request, call_next)
2024-08-08 10:25:14 ibis-server-1      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/main.py", line 36, in request_logger
2024-08-08 10:25:14 ibis-server-1      |     raise e
2024-08-08 10:25:14 ibis-server-1      |   File "/app/main.py", line 33, in request_logger
2024-08-08 10:25:14 ibis-server-1      |     return await call_next(request)
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
2024-08-08 10:25:14 ibis-server-1      |     raise app_exc
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
2024-08-08 10:25:14 ibis-server-1      |     await self.app(scope, receive_or_disconnect, send_no_error)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
2024-08-08 10:25:14 ibis-server-1      |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
2024-08-08 10:25:14 ibis-server-1      |     raise exc
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-08-08 10:25:14 ibis-server-1      |     await app(scope, receive, sender)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
2024-08-08 10:25:14 ibis-server-1      |     await self.middleware_stack(scope, receive, send)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
2024-08-08 10:25:14 ibis-server-1      |     await route.handle(scope, receive, send)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
2024-08-08 10:25:14 ibis-server-1      |     await self.app(scope, receive, send)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
2024-08-08 10:25:14 ibis-server-1      |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
2024-08-08 10:25:14 ibis-server-1      |     raise exc
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-08-08 10:25:14 ibis-server-1      |     await app(scope, receive, sender)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
2024-08-08 10:25:14 ibis-server-1      |     response = await func(request)
2024-08-08 10:25:14 ibis-server-1      |                ^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
2024-08-08 10:25:14 ibis-server-1      |     raw_response = await run_endpoint_function(
2024-08-08 10:25:14 ibis-server-1      |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
2024-08-08 10:25:14 ibis-server-1      |     return await run_in_threadpool(dependant.call, **values)
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
2024-08-08 10:25:14 ibis-server-1      |     return await anyio.to_thread.run_sync(func, *args)
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-08-08 10:25:14 ibis-server-1      |     return await get_async_backend().run_sync_in_worker_thread(
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
2024-08-08 10:25:14 ibis-server-1      |     return await future
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
2024-08-08 10:25:14 ibis-server-1      |     result = context.run(func, *args)
2024-08-08 10:25:14 ibis-server-1      |              ^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/routers/v2/connector.py", line 55, in get_table_list
2024-08-08 10:25:14 ibis-server-1      |     return metadata.get_table_list()
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/model/metadata/factory.py", line 36, in get_table_list
2024-08-08 10:25:14 ibis-server-1      |     return self.metadata.get_table_list()
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/model/metadata/mssql.py", line 45, in get_table_list
2024-08-08 10:25:14 ibis-server-1      |     DataSource.mssql.get_connection(self.connection_info)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/model/data_source.py", line 44, in get_connection
2024-08-08 10:25:14 ibis-server-1      |     return DataSourceExtension[self].get_connection(info)
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/model/data_source.py", line 69, in get_connection
2024-08-08 10:25:14 ibis-server-1      |     return getattr(self, f"get_{self.name}_connection")(info)
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/model/data_source.py", line 106, in get_mssql_connection
2024-08-08 10:25:14 ibis-server-1      |     return ibis.mssql.connect(
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/ibis/__init__.py", line 111, in connect
2024-08-08 10:25:14 ibis-server-1      |     return backend.connect(*args, **kwargs)
2024-08-08 10:25:14 ibis-server-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/ibis/backends/__init__.py", line 846, in connect
2024-08-08 10:25:14 ibis-server-1      |     new_backend.reconnect()
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/ibis/backends/__init__.py", line 861, in reconnect
2024-08-08 10:25:14 ibis-server-1      |     self.do_connect(*self._con_args, **self._con_kwargs)
2024-08-08 10:25:14 ibis-server-1      |   File "/app/.venv/lib/python3.11/site-packages/ibis/backends/mssql/__init__.py", line 115, in do_connect
2024-08-08 10:25:14 ibis-server-1      |     self.con = pyodbc.connect(
2024-08-08 10:25:14 ibis-server-1      |                ^^^^^^^^^^^^^^^
2024-08-08 10:25:14 ibis-server-1      | pyodbc.OperationalError: ('08001', '[08001] [FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)')
cyyeh commented 1 month ago

@johnfelipe please tell us your mssql server and Wren AI version, thank you.

johnfelipe commented 1 month ago

Wren, latest 0.7.5

El jue, 8 ago 2024, 6:22 p. m., Chih-Yu Yeh @.***> escribió:

@johnfelipe https://github.com/johnfelipe please tell us your mssql server and Wren AI version, thank you.

— Reply to this email directly, view it on GitHub https://github.com/Canner/WrenAI/issues/587#issuecomment-2276872247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFHPIDWBJX5C3AAZAL3ZQP4SLAVCNFSM6AAAAABMGXMV3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZWHA3TEMRUG4 . You are receiving this because you were mentioned.Message ID: @.***>

johnfelipe commented 1 month ago

Mssql V12, sorry I answer u in discord chat

johnfelipe commented 1 month ago

https://github.com/Canner/WrenAI/issues/586#issuecomment-2291050544