Describe the bug
AttributeError: 'str' object has no attribute 'items'
Langflow Version
0.6.17
Browser and Version
- Browser Edge
- Version 124.0.2478.80 (Official build) (x86_64)
Additional context
[05/05/24 02:04:32] ERROR 2024-05-05 02:04:32 - ERROR - chat - chat.py:217
'str' object has no attribute 'items'
Traceback (most recent call last):
File
"/usr/local/lib/python3.10/runpy.py",
line 196, in _run_module_as_main
return _run_code(code,
main_globals, None,
| | ->
{'name': 'main', 'doc':
None, 'package': 'langflow',
'loader':
<_frozen_importlib_external.SourceFileL
oad...
| -> <code object
at 0x7fe1b935f940, file
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 1>
-> <function _run_code at
0x7fe1e95288b0>
File
"/usr/local/lib/python3.10/runpy.py",
line 86, in _run_code
exec(code, run_globals)
| -> {'name':
'main', 'doc': None,
'package': 'langflow',
'loader':
<_frozen_importlib_external.SourceFileL
oad...
-> <code object at
0x7fe1b935f940, file
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 1>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 381, in
main()
-> <function main at
0x7fe1bcba1240>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 377, in
main
app()
-> <typer.main.Typer object at
0x7fe1bcc60430>
File
"/usr/local/lib/python3.10/site-package
s/typer/main.py", line 311, in call
return get_command(self)(*args,
**kwargs)
| | |
-> {}
| | -> ()
| ->
<typer.main.Typer object at
0x7fe1bcc60430>
-> <function get_command at
0x7fe1b90d6b00>
File
"/usr/local/lib/python3.10/site-package
s/click/core.py", line 1157, in
call
return self.main(*args, **kwargs)
| | | -> {}
| | -> ()
| -> <function
TyperGroup.main at 0x7fe1b90d6680>
->
File
"/usr/local/lib/python3.10/site-package
s/typer/core.py", line 783, in main
return _main(
-> <function _main at
0x7fe1b90d5900>
File
"/usr/local/lib/python3.10/site-package
s/typer/core.py", line 225, in _main
rv = self.invoke(ctx)
| | ->
<click.core.Context object at
0x7fe1bcc8b7f0>
| -> <function
MultiCommand.invoke at 0x7fe1b91e5120>
->
File
"/usr/local/lib/python3.10/site-package
s/click/core.py", line 1688, in invoke
return
_process_result(sub_ctx.command.invoke(
sub_ctx))
| | |
| -> <click.core.Context object at
0x7fe1bcb777f0>
| | |
-> <function Command.invoke at
0x7fe1b91e4c10>
| | ->
| ->
<click.core.Context object at
0x7fe1bcb777f0>
-> <function
MultiCommand.invoke.._process_r
esult at 0x7fe1bcba36d0>
File
"/usr/local/lib/python3.10/site-package
s/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback,
**ctx.params)
| | | |
| -> {'host': '0.0.0.0', 'port':
7860, 'workers': 1, 'timeout': 300,
'components_path':
PosixPath('/usr/local/lib/python3.10/si
te-...
| | | |
-> <click.core.Context object at
0x7fe1bcb777f0>
| | | -> <function
run at 0x7fe1bcba3400>
| | ->
| -> <function
Context.invoke at 0x7fe1b91cf910>
-> <click.core.Context
object at 0x7fe1bcb777f0>
File
"/usr/local/lib/python3.10/site-package
s/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
| ->
{'host': '0.0.0.0', 'port': 7860,
'workers': 1, 'timeout': 300,
'components_path':
PosixPath('/usr/local/lib/python3.10/si
te-...
-> ()
File
"/usr/local/lib/python3.10/site-package
s/typer/main.py", line 683, in wrapper
return callback(**use_params) #
type: ignore
| -> {'host':
'0.0.0.0', 'workers': 1, 'timeout':
300, 'port': 7860, 'components_path':
PosixPath('/usr/local/lib/python3.10/si
te-...
-> <function run at
0x7fe1bcba0e50>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 216, in
run
run_on_mac_or_linux(host, port,
log_level, options, app)
| | | |
| ->
<fastapi.applications.FastAPI object at
0x7fe1a932ca90>
| | | |
-> {'bind': '0.0.0.0:7860', 'workers':
1, 'timeout': 300, 'worker_class':
'uvicorn.workers.UvicornWorker'}
| | | ->
'debug'
| | -> 7860
| -> '0.0.0.0'
-> <function run_on_mac_or_linux at
0x7fe1bcba0d30>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 221, in
run_on_mac_or_linux
run_langflow(host, port, log_level,
options, app)
| | | |
| ->
<fastapi.applications.FastAPI object at
0x7fe1a932ca90>
| | | |
-> {'bind': '0.0.0.0:7860', 'workers':
1, 'timeout': 300, 'worker_class':
'uvicorn.workers.UvicornWorker'}
| | | -> 'debug'
| | -> 7860
| -> '0.0.0.0'
-> <function run_langflow at
0x7fe1bcba11b0>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 312, in
run_langflow
LangflowApplication(app,
options).run()
| | ->
{'bind': '0.0.0.0:7860', 'workers': 1,
'timeout': 300, 'worker_class':
'uvicorn.workers.UvicornWorker'}
| ->
<fastapi.applications.FastAPI object at
0x7fe1a932ca90>
-> <class
'langflow.server.LangflowApplication'>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/app/base.py", line 72, in
run
Arbiter(self).run()
| ->
<langflow.server.LangflowApplication
object at 0x7fe1a8a9ebf0>
-> <class
'gunicorn.arbiter.Arbiter'>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/arbiter.py", line 202, in
run
self.manage_workers()
| -> <function
Arbiter.manage_workers at
0x7fe1a8ac6e60>
-> <gunicorn.arbiter.Arbiter object
at 0x7fe1a89e3fd0>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/arbiter.py", line 571, in
manage_workers
self.spawn_workers()
| -> <function
Arbiter.spawn_workers at
0x7fe1a8ac6f80>
-> <gunicorn.arbiter.Arbiter object
at 0x7fe1a89e3fd0>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/arbiter.py", line 642, in
spawn_workers
self.spawn_worker()
| -> <function
Arbiter.spawn_worker at 0x7fe1a8ac6ef0>
-> <gunicorn.arbiter.Arbiter object
at 0x7fe1a89e3fd0>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/arbiter.py", line 609, in
spawn_worker
worker.init_process()
| -> <function
UvicornWorker.init_process at
0x7fe1a8829a20>
-> <uvicorn.workers.UvicornWorker
object at 0x7fe1bcb46890>
File
"/usr/local/lib/python3.10/site-package
s/uvicorn/workers.py", line 66, in
init_process
super(UvicornWorker,
self).init_process()
| ->
<uvicorn.workers.UvicornWorker object
at 0x7fe1bcb46890>
-> <class
'uvicorn.workers.UvicornWorker'>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/workers/base.py", line 142,
in init_process
self.run()
| -> <function UvicornWorker.run
at 0x7fe1a8829c60>
-> <uvicorn.workers.UvicornWorker
object at 0x7fe1bcb46890>
File
"/usr/local/lib/python3.10/site-package
s/uvicorn/workers.py", line 98, in run
return asyncio.run(self._serve())
| | | ->
<function UvicornWorker._serve at
0x7fe1a8829bd0>
| | ->
<uvicorn.workers.UvicornWorker object
at 0x7fe1bcb46890>
| -> <function run at
0x7fe1e8d6e4d0>
-> <module 'asyncio' from
'/usr/local/lib/python3.10/asyncio/in
it.py'>
File
"/usr/local/lib/python3.10/asyncio/runn
ers.py", line 44, in run
return
loop.run_until_complete(main)
| | ->
<coroutine object UvicornWorker._serve
at 0x7fe1a8835540>
| -> <method
'run_until_complete' of
'uvloop.loop.Loop' objects>
-> <uvloop.Loop running=True
closed=False debug=False>
File
"/usr/local/lib/python3.10/site-package
s/starlette/responses.py", line 260, in
wrap
await func()
-> functools.partial(<bound
method
StreamingResponse.stream_response of
<starlette.responses.StreamingResponse
object at 0x7fe1c...
File
"/usr/local/lib/python3.10/site-package
s/starlette/responses.py", line 249, in
stream_response
async for chunk in
self.body_iterator:
| ->
<async_generator object
stream_build..event_stream at
0x7fe1ce9a1040>
->
<starlette.responses.StreamingResponse
object at 0x7fe1ce87a0b0>
> File
"/usr/local/lib/python3.10/site-package
s/langflow/api/v1/chat.py", line 150,
in event_stream
graph =
Graph.from_payload(graph_data)
| | ->
{'name': 'lill25 test ollama',
'description': 'Unfolding Linguistic
Possibilities.', 'data': {'nodes':
[{'id': 'BaseLLM-Ns3Qh...
| ->
<classmethod(<function
Graph.from_payload at 0x7fe1b9358c10>)>
-> <class
'langflow.graph.graph.base.Graph'>
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/graph/base.py", line
59, in from_payload
return cls(vertices, edges)
| | -> [{'source':
'ConversationBufferMemory-16N2x',
'sourceHandle':
'{œbaseClassesœ:[œConversationBufferMem
oryœ,œBaseMemoryœ,œBaseC...
| -> [{'id':
'BaseLLM-Ns3Qh', 'type': 'genericNode',
'position': {'x': -395.7470792565887,
'y': 1170.4865220713727}, 'data':
{'typ...
-> <class
'langflow.graph.graph.base.Graph'>
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/graph/base.py", line
35, in init
self._build_graph()
| -> <function
Graph._build_graph at 0x7fe1b9358d30>
-> Graph:
Nodes: ['BaseLLM-Ns3Qh',
'ConversationalRetrievalChain-kImXj',
'ConversationBufferMemory-16N2x',
'PostgresChatMessageH...
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/graph/base.py", line
79, in _build_graph
self._build_vertex_params()
| -> <function
Graph._build_vertex_params at
0x7fe1b9358dc0>
-> Graph:
Nodes: ['BaseLLM-Ns3Qh',
'ConversationalRetrievalChain-kImXj',
'ConversationBufferMemory-16N2x',
'PostgresChatMessageH...
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/graph/base.py", line
87, in _build_vertex_params
vertex._build_params()
| -> <function
Vertex._build_params at 0x7fe1b967d510>
-> Vertex(id=Qdrant-ibD3d,
data={'type': 'Qdrant', 'node':
{'template': {'documents': {'type':
'Document', 'required': False, 'p...
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/vertex/base.py", line
184, in _build_params
params = {k: v for item in
value.get("value", []) for k, v in
item.items()}
| | |
-> <method 'get' of 'dict' objects>
| | ->
{'type': 'NestedDict', 'required':
False, 'placeholder': '', 'list':
False, 'show': True, 'multiline':
False, 'fileTypes': []...
| -> 'search_kwargs'
-> {'documents':
Vertex(id=CharacterTextSplitter-BFWW2,
data={'type': 'CharacterTextSplitter',
'node': {'template': {'documents'...
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/vertex/base.py", line
184, in
params = {k: v for item in
value.get("value", []) for k, v in
item.items()}
|
-> 'value'
-> 'value'
AttributeError: 'str' object has no
attribute 'items'
╭─ Traceback (most recent call last) ─╮
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/api/v1/chat.py:150 in │
│ event_stream │
│ │
│ 147 │ │ │ logger.debug("Bui │
│ 148 │ │ │ │
│ 149 │ │ │ # Some error coul │
│ ❱ 150 │ │ │ graph = Graph.fro │
│ 151 │ │ │ │
│ 152 │ │ │ number_of_nodes = │
│ 153 │ │ │ update_build_stat │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/graph/base.py:5 │
│ 9 in from_payload │
│ │
│ 56 │ │ try: │
│ 57 │ │ │ vertices = payloa │
│ 58 │ │ │ edges = payload[" │
│ ❱ 59 │ │ │ return cls(vertic │
│ 60 │ │ except KeyError as ex │
│ 61 │ │ │ logger.exception( │
│ 62 │ │ │ raise ValueError( │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/graph/base.py:3 │
│ 5 in init │
│ │
│ 32 │ │ │
│ 33 │ │ self._vertices = self │
│ 34 │ │ self._edges = self._g │
│ ❱ 35 │ │ self._build_graph() │
│ 36 │ │
│ 37 │ def getstate(self): │
│ 38 │ │ return self.raw_graph │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/graph/base.py:7 │
│ 9 in _build_graph │
│ │
│ 76 │ │ │
│ 77 │ │ # This is a hack to m │
│ 78 │ │ # the toolkit vertex │
│ ❱ 79 │ │ self._build_vertex_pa │
│ 80 │ │ # remove invalid vert │
│ 81 │ │ self._validate_vertic │
│ 82 │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/graph/base.py:8 │
│ 7 in _build_vertex_params │
│ │
│ 84 │ │ """Identifies and han │
│ 85 │ │ llm_vertex = None │
│ 86 │ │ for vertex in self.ve │
│ ❱ 87 │ │ │ vertex._build_par │
│ 88 │ │ │ if isinstance(ver │
│ 89 │ │ │ │ llm_vertex = │
│ 90 │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/vertex/base.py: │
│ 184 in _build_params │
│ │
│ 181 │ │ │ │ │ # list of │
│ 182 │ │ │ │ │ # before │
│ 183 │ │ │ │ │ if isinst │
│ ❱ 184 │ │ │ │ │ │ param │
│ in item.items()} │
│ 185 │ │ │ │ │ elif isin │
│ 186 │ │ │ │ │ │ param │
│ 187 │ │ │ │ elif value.ge │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/vertex/base.py: │
│ 184 in │
│ │
│ 181 │ │ │ │ │ # list of │
│ 182 │ │ │ │ │ # before │
│ 183 │ │ │ │ │ if isinst │
│ ❱ 184 │ │ │ │ │ │ param │
│ in item.items()} │
│ 185 │ │ │ │ │ elif isin │
│ 186 │ │ │ │ │ │ param │
│ 187 │ │ │ │ elif value.ge │
╰─────────────────────────────────────╯
AttributeError: 'str' object has no
attribute 'items'
ERROR 2024-05-05 02:04:32 - ERROR - chat - chat.py:218
Error while building the flow: %s
Describe the bug
AttributeError: 'str' object has no attribute 'items'
Langflow Version
0.6.17
Browser and Version
Additional context
[05/05/24 02:04:32] ERROR 2024-05-05 02:04:32 - ERROR - chat - chat.py:217
'str' object has no attribute 'items'
Traceback (most recent call last):
File
"/usr/local/lib/python3.10/runpy.py",
line 196, in _run_module_as_main
return _run_code(code,
main_globals, None,
| | ->
{'name': 'main', 'doc':
None, 'package': 'langflow',
'loader':
<_frozen_importlib_external.SourceFileL
oad...
| -> <code object
at 0x7fe1b935f940, file
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 1>
-> <function _run_code at
0x7fe1e95288b0>
File
"/usr/local/lib/python3.10/runpy.py",
line 86, in _run_code
exec(code, run_globals)
| -> {'name':
'main', 'doc': None,
'package': 'langflow',
'loader':
<_frozen_importlib_external.SourceFileL
oad...
-> <code object at
0x7fe1b935f940, file
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 1>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 381, in
main()
-> <function main at
0x7fe1bcba1240>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 377, in
main
app()
-> <typer.main.Typer object at
0x7fe1bcc60430>
File
"/usr/local/lib/python3.10/site-package
s/typer/main.py", line 311, in call
return get_command(self)(*args,
**kwargs)
| | |
-> {}
| | -> ()
| ->
<typer.main.Typer object at
0x7fe1bcc60430>
-> <function get_command at
0x7fe1b90d6b00>
File
"/usr/local/lib/python3.10/site-package
s/click/core.py", line 1157, in
call
return self.main(*args, **kwargs)
| | | -> {}
| | -> ()
| -> <function
TyperGroup.main at 0x7fe1b90d6680>
->
File
"/usr/local/lib/python3.10/site-package
s/typer/core.py", line 783, in main
return _main(
-> <function _main at
0x7fe1b90d5900>
File
"/usr/local/lib/python3.10/site-package
s/typer/core.py", line 225, in _main
rv = self.invoke(ctx)
| | ->
<click.core.Context object at
0x7fe1bcc8b7f0>
| -> <function
MultiCommand.invoke at 0x7fe1b91e5120>
->
File
"/usr/local/lib/python3.10/site-package
s/click/core.py", line 1688, in invoke
return
_process_result(sub_ctx.command.invoke(
sub_ctx))
| | |
| -> <click.core.Context object at
0x7fe1bcb777f0>
| | |
-> <function Command.invoke at
0x7fe1b91e4c10>
| | ->
| ->
<click.core.Context object at
0x7fe1bcb777f0>
-> <function
MultiCommand.invoke.._process_r
esult at 0x7fe1bcba36d0>
File
"/usr/local/lib/python3.10/site-package
s/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback,
**ctx.params)
| | | |
| -> {'host': '0.0.0.0', 'port':
7860, 'workers': 1, 'timeout': 300,
'components_path':
PosixPath('/usr/local/lib/python3.10/si
te-...
| | | |
-> <click.core.Context object at
0x7fe1bcb777f0>
| | | -> <function
run at 0x7fe1bcba3400>
| | ->
| -> <function
Context.invoke at 0x7fe1b91cf910>
-> <click.core.Context
object at 0x7fe1bcb777f0>
File
"/usr/local/lib/python3.10/site-package
s/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
| ->
{'host': '0.0.0.0', 'port': 7860,
'workers': 1, 'timeout': 300,
'components_path':
PosixPath('/usr/local/lib/python3.10/si
te-...
-> ()
File
"/usr/local/lib/python3.10/site-package
s/typer/main.py", line 683, in wrapper
return callback(**use_params) #
type: ignore
| -> {'host':
'0.0.0.0', 'workers': 1, 'timeout':
300, 'port': 7860, 'components_path':
PosixPath('/usr/local/lib/python3.10/si
te-...
-> <function run at
0x7fe1bcba0e50>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 216, in
run
run_on_mac_or_linux(host, port,
log_level, options, app)
| | | |
| ->
<fastapi.applications.FastAPI object at
0x7fe1a932ca90>
| | | |
-> {'bind': '0.0.0.0:7860', 'workers':
1, 'timeout': 300, 'worker_class':
'uvicorn.workers.UvicornWorker'}
| | | ->
'debug'
| | -> 7860
| -> '0.0.0.0'
-> <function run_on_mac_or_linux at
0x7fe1bcba0d30>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 221, in
run_on_mac_or_linux
run_langflow(host, port, log_level,
options, app)
| | | |
| ->
<fastapi.applications.FastAPI object at
0x7fe1a932ca90>
| | | |
-> {'bind': '0.0.0.0:7860', 'workers':
1, 'timeout': 300, 'worker_class':
'uvicorn.workers.UvicornWorker'}
| | | -> 'debug'
| | -> 7860
| -> '0.0.0.0'
-> <function run_langflow at
0x7fe1bcba11b0>
File
"/usr/local/lib/python3.10/site-package
s/langflow/main.py", line 312, in
run_langflow
LangflowApplication(app,
options).run()
| | ->
{'bind': '0.0.0.0:7860', 'workers': 1,
'timeout': 300, 'worker_class':
'uvicorn.workers.UvicornWorker'}
| ->
<fastapi.applications.FastAPI object at
0x7fe1a932ca90>
-> <class
'langflow.server.LangflowApplication'>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/app/base.py", line 72, in
run
Arbiter(self).run()
| ->
<langflow.server.LangflowApplication
object at 0x7fe1a8a9ebf0>
-> <class
'gunicorn.arbiter.Arbiter'>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/arbiter.py", line 202, in
run
self.manage_workers()
| -> <function
Arbiter.manage_workers at
0x7fe1a8ac6e60>
-> <gunicorn.arbiter.Arbiter object
at 0x7fe1a89e3fd0>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/arbiter.py", line 571, in
manage_workers
self.spawn_workers()
| -> <function
Arbiter.spawn_workers at
0x7fe1a8ac6f80>
-> <gunicorn.arbiter.Arbiter object
at 0x7fe1a89e3fd0>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/arbiter.py", line 642, in
spawn_workers
self.spawn_worker()
| -> <function
Arbiter.spawn_worker at 0x7fe1a8ac6ef0>
-> <gunicorn.arbiter.Arbiter object
at 0x7fe1a89e3fd0>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/arbiter.py", line 609, in
spawn_worker
worker.init_process()
| -> <function
UvicornWorker.init_process at
0x7fe1a8829a20>
-> <uvicorn.workers.UvicornWorker
object at 0x7fe1bcb46890>
File
"/usr/local/lib/python3.10/site-package
s/uvicorn/workers.py", line 66, in
init_process
super(UvicornWorker,
self).init_process()
| ->
<uvicorn.workers.UvicornWorker object
at 0x7fe1bcb46890>
-> <class
'uvicorn.workers.UvicornWorker'>
File
"/usr/local/lib/python3.10/site-package
s/gunicorn/workers/base.py", line 142,
in init_process
self.run()
| -> <function UvicornWorker.run
at 0x7fe1a8829c60>
-> <uvicorn.workers.UvicornWorker
object at 0x7fe1bcb46890>
File
"/usr/local/lib/python3.10/site-package
s/uvicorn/workers.py", line 98, in run
return asyncio.run(self._serve())
| | | ->
<function UvicornWorker._serve at
0x7fe1a8829bd0>
| | ->
<uvicorn.workers.UvicornWorker object
at 0x7fe1bcb46890>
| -> <function run at
0x7fe1e8d6e4d0>
-> <module 'asyncio' from
'/usr/local/lib/python3.10/asyncio/in
it.py'>
File
"/usr/local/lib/python3.10/asyncio/runn
ers.py", line 44, in run
return
loop.run_until_complete(main)
| | ->
<coroutine object UvicornWorker._serve
at 0x7fe1a8835540>
| -> <method
'run_until_complete' of
'uvloop.loop.Loop' objects>
-> <uvloop.Loop running=True
closed=False debug=False>
File
"/usr/local/lib/python3.10/site-package
s/starlette/responses.py", line 260, in
wrap
await func()
-> functools.partial(<bound
method
StreamingResponse.stream_response of
<starlette.responses.StreamingResponse
object at 0x7fe1c...
File
"/usr/local/lib/python3.10/site-package
s/starlette/responses.py", line 249, in
stream_response
async for chunk in
self.body_iterator:
| ->
<async_generator object
stream_build..event_stream at
0x7fe1ce9a1040>
->
<starlette.responses.StreamingResponse
object at 0x7fe1ce87a0b0>
> File
"/usr/local/lib/python3.10/site-package
s/langflow/api/v1/chat.py", line 150,
in event_stream
graph =
Graph.from_payload(graph_data)
| | ->
{'name': 'lill25 test ollama',
'description': 'Unfolding Linguistic
Possibilities.', 'data': {'nodes':
[{'id': 'BaseLLM-Ns3Qh...
| ->
<classmethod(<function
Graph.from_payload at 0x7fe1b9358c10>)>
-> <class
'langflow.graph.graph.base.Graph'>
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/graph/base.py", line
59, in from_payload
return cls(vertices, edges)
| | -> [{'source':
'ConversationBufferMemory-16N2x',
'sourceHandle':
'{œbaseClassesœ:[œConversationBufferMem
oryœ,œBaseMemoryœ,œBaseC...
| -> [{'id':
'BaseLLM-Ns3Qh', 'type': 'genericNode',
'position': {'x': -395.7470792565887,
'y': 1170.4865220713727}, 'data':
{'typ...
-> <class
'langflow.graph.graph.base.Graph'>
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/graph/base.py", line
35, in init
self._build_graph()
| -> <function
Graph._build_graph at 0x7fe1b9358d30>
-> Graph:
Nodes: ['BaseLLM-Ns3Qh',
'ConversationalRetrievalChain-kImXj',
'ConversationBufferMemory-16N2x',
'PostgresChatMessageH...
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/graph/base.py", line
79, in _build_graph
self._build_vertex_params()
| -> <function
Graph._build_vertex_params at
0x7fe1b9358dc0>
-> Graph:
Nodes: ['BaseLLM-Ns3Qh',
'ConversationalRetrievalChain-kImXj',
'ConversationBufferMemory-16N2x',
'PostgresChatMessageH...
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/graph/base.py", line
87, in _build_vertex_params
vertex._build_params()
| -> <function
Vertex._build_params at 0x7fe1b967d510>
-> Vertex(id=Qdrant-ibD3d,
data={'type': 'Qdrant', 'node':
{'template': {'documents': {'type':
'Document', 'required': False, 'p...
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/vertex/base.py", line
184, in _build_params
params = {k: v for item in
value.get("value", []) for k, v in
item.items()}
| | |
-> <method 'get' of 'dict' objects>
| | ->
{'type': 'NestedDict', 'required':
False, 'placeholder': '', 'list':
False, 'show': True, 'multiline':
False, 'fileTypes': []...
| -> 'search_kwargs'
-> {'documents':
Vertex(id=CharacterTextSplitter-BFWW2,
data={'type': 'CharacterTextSplitter',
'node': {'template': {'documents'...
File
"/usr/local/lib/python3.10/site-package
s/langflow/graph/vertex/base.py", line
184, in
params = {k: v for item in
value.get("value", []) for k, v in
item.items()}
|
-> 'value'
-> 'value'
AttributeError: 'str' object has no
attribute 'items'
╭─ Traceback (most recent call last) ─╮
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/api/v1/chat.py:150 in │
│ event_stream │
│ │
│ 147 │ │ │ logger.debug("Bui │
│ 148 │ │ │ │
│ 149 │ │ │ # Some error coul │
│ ❱ 150 │ │ │ graph = Graph.fro │
│ 151 │ │ │ │
│ 152 │ │ │ number_of_nodes = │
│ 153 │ │ │ update_build_stat │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/graph/base.py:5 │
│ 9 in from_payload │
│ │
│ 56 │ │ try: │
│ 57 │ │ │ vertices = payloa │
│ 58 │ │ │ edges = payload[" │
│ ❱ 59 │ │ │ return cls(vertic │
│ 60 │ │ except KeyError as ex │
│ 61 │ │ │ logger.exception( │
│ 62 │ │ │ raise ValueError( │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/graph/base.py:3 │
│ 5 in init │
│ │
│ 32 │ │ │
│ 33 │ │ self._vertices = self │
│ 34 │ │ self._edges = self._g │
│ ❱ 35 │ │ self._build_graph() │
│ 36 │ │
│ 37 │ def getstate(self): │
│ 38 │ │ return self.raw_graph │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/graph/base.py:7 │
│ 9 in _build_graph │
│ │
│ 76 │ │ │
│ 77 │ │ # This is a hack to m │
│ 78 │ │ # the toolkit vertex │
│ ❱ 79 │ │ self._build_vertex_pa │
│ 80 │ │ # remove invalid vert │
│ 81 │ │ self._validate_vertic │
│ 82 │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/graph/base.py:8 │
│ 7 in _build_vertex_params │
│ │
│ 84 │ │ """Identifies and han │
│ 85 │ │ llm_vertex = None │
│ 86 │ │ for vertex in self.ve │
│ ❱ 87 │ │ │ vertex._build_par │
│ 88 │ │ │ if isinstance(ver │
│ 89 │ │ │ │ llm_vertex = │
│ 90 │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/vertex/base.py: │
│ 184 in _build_params │
│ │
│ 181 │ │ │ │ │ # list of │
│ 182 │ │ │ │ │ # before │
│ 183 │ │ │ │ │ if isinst │
│ ❱ 184 │ │ │ │ │ │ param │
│ in item.items()} │
│ 185 │ │ │ │ │ elif isin │
│ 186 │ │ │ │ │ │ param │
│ 187 │ │ │ │ elif value.ge │
│ │
│ /usr/local/lib/python3.10/site-pack │
│ ages/langflow/graph/vertex/base.py: │
│ 184 in │
│ │
│ 181 │ │ │ │ │ # list of │
│ 182 │ │ │ │ │ # before │
│ 183 │ │ │ │ │ if isinst │
│ ❱ 184 │ │ │ │ │ │ param │
│ in item.items()} │
│ 185 │ │ │ │ │ elif isin │
│ 186 │ │ │ │ │ │ param │
│ 187 │ │ │ │ elif value.ge │
╰─────────────────────────────────────╯
AttributeError: 'str' object has no
attribute 'items'
ERROR 2024-05-05 02:04:32 - ERROR - chat - chat.py:218
Error while building the flow: %s