-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
connect datasource error ''str' object has no attribute 'set_http_session'
To Reproduce
Steps to reproduce the behavior:
- Go to 'docker deploy'
- Go to connect to trino_476
- See error
Expected behavior
Screenshots
connect to trino error

Desktop (please complete the following information):
- OS: linux
- Browser chrome
Wren AI Information
ghcr.io/canner/wren-ai-service:0.27.1
ghcr.io/canner/wren-ui:0.31.1
ghcr.io/canner/wren-engine:0.18.3
ghcr.io/canner/wren-engine-ibis:0.18.3
Additional context
Relevant log output
config.yaml
type: llm
provider: litellm_llm
timeout: 120
models:
- alias: default
model: gpt-4.1-nano-2025-04-14
context_window_size: 1000000
kwargs:
max_tokens: 4096
n: 1
seed: 0
temperature: 0
- model: gpt-4.1-mini-2025-04-14
context_window_size: 1000000
kwargs:
max_tokens: 4096
n: 1
seed: 0
temperature: 0
- model: gpt-4.1-2025-04-14
context_window_size: 1000000
kwargs:
max_tokens: 4096
n: 1
seed: 0
temperature: 0
- model: gpt-5-nano-2025-08-07
context_window_size: 380000
kwargs:
max_completion_tokens: 4096
n: 1
seed: 0
reasoning_effort: minimal
- model: gpt-5-mini-2025-08-07
context_window_size: 380000
kwargs:
max_completion_tokens: 4096
n: 1
seed: 0
reasoning_effort: minimal
- model: gpt-5-2025-08-07
context_window_size: 380000
kwargs:
max_completion_tokens: 4096
n: 1
seed: 0
reasoning_effort: minimal
---
type: embedder
provider: litellm_embedder
models:
- model: text-embedding-3-large
alias: default
timeout: 120
---
type: engine
provider: wren_ui
endpoint: http://wren-ui:3000
---
type: engine
provider: wren_ibis
endpoint: http://ibis-server:8000
---
type: document_store
provider: qdrant
location: http://qdrant:6333
embedding_model_dim: 3072
timeout: 120
recreate_index: true
---
type: pipeline
pipes:
- name: db_schema_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: historical_question_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: table_description_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: db_schema_retrieval
llm: litellm_llm.default
embedder: litellm_embedder.default
document_store: qdrant
- name: historical_question_retrieval
embedder: litellm_embedder.default
document_store: qdrant
- name: sql_generation
llm: litellm_llm.default
engine: wren_ui
document_store: qdrant
- name: sql_correction
llm: litellm_llm.default
engine: wren_ui
document_store: qdrant
- name: followup_sql_generation
llm: litellm_llm.default
engine: wren_ui
document_store: qdrant
- name: sql_answer
llm: litellm_llm.default
- name: semantics_description
llm: litellm_llm.default
- name: relationship_recommendation
llm: litellm_llm.default
engine: wren_ui
- name: question_recommendation
llm: litellm_llm.default
- name: question_recommendation_db_schema_retrieval
llm: litellm_llm.default
embedder: litellm_embedder.default
document_store: qdrant
- name: question_recommendation_sql_generation
llm: litellm_llm.default
engine: wren_ui
document_store: qdrant
- name: intent_classification
llm: litellm_llm.default
embedder: litellm_embedder.default
document_store: qdrant
- name: misleading_assistance
llm: litellm_llm.default
- name: data_assistance
llm: litellm_llm.default
- name: sql_pairs_indexing
document_store: qdrant
embedder: litellm_embedder.default
- name: sql_pairs_retrieval
document_store: qdrant
embedder: litellm_embedder.default
llm: litellm_llm.default
- name: preprocess_sql_data
llm: litellm_llm.default
- name: sql_executor
engine: wren_ui
- name: chart_generation
llm: litellm_llm.default
- name: chart_adjustment
llm: litellm_llm.default
- name: user_guide_assistance
llm: litellm_llm.default
- name: sql_question_generation
llm: litellm_llm.default
- name: sql_generation_reasoning
llm: litellm_llm.default
- name: followup_sql_generation_reasoning
llm: litellm_llm.default
- name: sql_regeneration
llm: litellm_llm.default
engine: wren_ui
- name: instructions_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: instructions_retrieval
embedder: litellm_embedder.default
document_store: qdrant
- name: sql_functions_retrieval
engine: wren_ibis
document_store: qdrant
- name: project_meta_indexing
document_store: qdrant
- name: sql_tables_extraction
llm: litellm_llm.default
---
settings:
doc_endpoint: https://docs.getwren.ai
is_oss: true
engine_timeout: 30
column_indexing_batch_size: 50
table_retrieval_size: 10
table_column_retrieval_size: 100
allow_intent_classification: true
allow_sql_generation_reasoning: true
allow_sql_functions_retrieval: true
enable_column_pruning: false
max_sql_correction_retries: 3
query_cache_maxsize: 1000
query_cache_ttl: 3600
langfuse_host: https://cloud.langfuse.com
langfuse_enable: true
logging_level: DEBUG
development: false
historical_question_retrieval_similarity_threshold: 0.9
sql_pairs_similarity_threshold: 0.7
sql_pairs_retrieval_max_size: 10
instructions_similarity_threshold: 0.7
instructions_top_k: 10
docker logs wrenai-ibis error
2025-08-13 12:09:09.278 | [57babb4f-cb2d-4f50-bb78-a0e32e3c35b3] | ERROR | __init__.dispatch:26 - Request failed
Traceback (most recent call last):
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in call_next
message = await recv_stream.receive()
File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 126, in receive
raise EndOfStream from None
anyio.EndOfStream
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/.venv/bin/gunicorn", line 8, in <module>
sys.exit(run())
File "/app/.venv/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 66, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run()
File "/app/.venv/lib/python3.11/site-packages/gunicorn/app/base.py", line 235, in run
super().run()
File "/app/.venv/lib/python3.11/site-packages/gunicorn/app/base.py", line 71, in run
Arbiter(self).run()
File "/app/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py", line 201, in run
self.manage_workers()
File "/app/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py", line 570, in manage_workers
self.spawn_workers()
File "/app/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py", line 641, in spawn_workers
self.spawn_worker()
File "/app/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker
worker.init_process()
File "/app/.venv/lib/python3.11/site-packages/uvicorn/workers.py", line 75, in init_process
super().init_process()
File "/app/.venv/lib/python3.11/site-packages/gunicorn/workers/base.py", line 143, in init_process
self.run()
File "/app/.venv/lib/python3.11/site-packages/uvicorn/workers.py", line 107, in run
return asyncio.run(self._serve())
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 184, in __call__
response = await self.dispatch_func(request, call_next)
> File "/app/app/middleware/__init__.py", line 24, in dispatch
return await call_next(request)
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 159, in call_next
raise app_exc
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 716, in __call__
await self.middleware_stack(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 736, in app
await route.handle(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 290, in handle
await self.app(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 78, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 75, in app
response = await f(request)
File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 302, in app
raw_response = await run_endpoint_function(
File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 213, in run_endpoint_function
return await dependant.call(**values)
File "/app/app/routers/v2/connector.py", line 264, in get_table_list
return await execute_get_table_list_with_timeout(metadata)
File "/app/app/util.py", line 368, in execute_get_table_list_with_timeout
return await execute_with_timeout(
File "/app/app/util.py", line 251, in execute_with_timeout
return await asyncio.wait_for(operation, timeout=app_timeout_seconds)
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
return fut.result()
File "/usr/local/lib/python3.11/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/app/app/model/metadata/trino.py", line 48, in get_table_list
response = self.connection.sql(sql).to_pandas().to_dict(orient="records")
File "/app/.venv/lib/python3.11/site-packages/ibis/backends/sql/__init__.py", line 164, in sql
schema = self._get_schema_using_query(query)
File "/app/.venv/lib/python3.11/site-packages/ibis/backends/trino/__init__.py", line 353, in _get_schema_using_query
with self.begin() as cur:
File "/usr/local/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
File "/app/.venv/lib/python3.11/site-packages/ibis/backends/trino/__init__.py", line 99, in begin
cur = con.cursor()
File "/app/.venv/lib/python3.11/site-packages/trino/dbapi.py", line 288, in cursor
request = self._create_request()
File "/app/.venv/lib/python3.11/site-packages/trino/dbapi.py", line 269, in _create_request
return trino.client.TrinoRequest(
File "/app/.venv/lib/python3.11/site-packages/trino/client.py", line 492, in __init__
self._auth.set_http_session(self._http_session)
AttributeError: 'str' object has no attribute 'set_http_session'
2025-08-13 12:09:09.283 | [57babb4f-cb2d-4f50-bb78-a0e32e3c35b3] | INFO | __init__.dispatch:29 - Request ended
docker logs wrenai-wren-ui
[2025-08-13T12:08:00.217] [DEBUG] IbisAdaptor - Get tables error: 'str' object has no attribute 'set_http_session'
[2025-08-13T12:08:00.217] [ERROR] DataSourceResolver - Failed to get project tables {
"message": "'str' object has no attribute 'set_http_session'",
"extensions": {
"originalError": {
"message": "Request failed with status code 500",
"name": "AxiosError",
"stack": "AxiosError: Request failed with status code 500\n at settle (file:///app/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///app/node_modules/axios/lib/adapters/http.js:599:11)\n at IncomingMessage.emit (node:events:529:35)\n at endReadableNT (node:internal/streams/readable:1400:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at Axios.request (file:///app/node_modules/axios/lib/core/Axios.js:45:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async r (/app/.next/server/chunks/980.js:1:3386)\n at async Promise.all (index 0)\n at async w.getTables (/app/.next/server/chunks/980.js:1:3645)\n at async n.listTables (/app/.next/server/chunks/980.js:8:29309)\n at async g.getProjectDataSourceTables (/app/.next/server/chunks/980.js:8:41375)\n at async y.saveDataSource (/app/.next/server/pages/api/graphql.js:1:91820)",
"config": {
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false
},
"adapter": [
"xhr",
"http",
"fetch"
],
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"env": {},
"headers": {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"User-Agent": "axios/1.8.4",
"Content-Length": "126",
"Accept-Encoding": "gzip, compress, deflate, br"
},
"method": "post",
"url": "http://ibis-server:8000/v2/connector/trino/metadata/tables",
"data": "{\"connectionInfo\":{\"host\":\"http://28d0e2693cd7\",\"port\":\"80\",\"catalog\":\"hive\",\"schema\":\"dw\",\"user\":\"admin\",\"password\":\"admin\"}}",
"allowAbsoluteUrls": true
},
"code": "ERR_BAD_RESPONSE",
"status": 500
},
"code": "IBIS_SERVER_ERROR",
"message": "'str' object has no attribute 'set_http_session'",
"shortMessage": "Data connection error",
"other": {}
}
}
sendEvent connection_save_data_source_failed {
eventProperties: { dataSourceType: 'TRINO' },
error: "'str' object has no attribute 'set_http_session'"
} UNKNOWN false
[2025-08-13T12:08:00.221] [ERROR] APOLLO - == original error ==
[2025-08-13T12:08:00.221] [ERROR] APOLLO - AxiosError: Request failed with status code 500
at settle (file:///app/node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (file:///app/node_modules/axios/lib/adapters/http.js:599:11)
at IncomingMessage.emit (node:events:529:35)
at endReadableNT (node:internal/streams/readable:1400:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at Axios.request (file:///app/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async r (/app/.next/server/chunks/980.js:1:3386)
at async Promise.all (index 0)
at async w.getTables (/app/.next/server/chunks/980.js:1:3645)
at async n.listTables (/app/.next/server/chunks/980.js:8:29309)
at async g.getProjectDataSourceTables (/app/.next/server/chunks/980.js:8:41375)
at async y.saveDataSource (/app/.next/server/pages/api/graphql.js:1:91820)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working