Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG] Cannot convert undefined or null to object - Redis Vector Store

Open danielstankw opened this issue 1 year ago • 5 comments

Due to the issues I had with In-memory vector store I have switched it to the Redis one. Every time I attempt to Upsert Vector Database I get the following error": image

2024-04-09 06:58:45 [ERROR]: Cannot convert undefined or null to object
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at escapeAllStrings (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/vectorstores/Redis/utils.js:14:12)
    at /usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/vectorstores/Redis/utils.js:18:42
    at Array.forEach (<anonymous>)
    at escapeAllStrings (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/vectorstores/Redis/utils.js:14:22)
    at /usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/vectorstores/Redis/utils.js:18:42
    at Array.forEach (<anonymous>)
    at escapeAllStrings (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/vectorstores/Redis/utils.js:14:22)
    at Redis_VectorStores.upsert (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/vectorstores/Redis/Redis.js:55:54)
    at async buildFlow (/usr/local/lib/node_modules/flowise/dist/utils/index.js:265:17)
    at async App.upsertVector (/usr/local/lib/node_modules/flowise/dist/index.js:1698:13)
    at async /usr/local/lib/node_modules/flowise/dist/index.js:1193:13
2024-04-09 06:58:45 [ERROR]: [server]: Error: TypeError: Cannot convert undefined or null to object
Error: TypeError: Cannot convert undefined or null to object
    at buildFlow (/usr/local/lib/node_modules/flowise/dist/utils/index.js:326:19)
    at async App.upsertVector (/usr/local/lib/node_modules/flowise/dist/index.js:1698:13)
    at async /usr/local/lib/node_modules/flowise/dist/index.js:1193:13

danielstankw avatar Apr 09 '24 07:04 danielstankw

do you have Redis Stack running on Docker? https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/docker/

1.) My Flow: image

2.) Upsert result image

3.) Vectors on Redis that were upserted: image

HenryHengZJ avatar Apr 09 '24 10:04 HenryHengZJ

Do you have any suggestions for some steps worth taking to troubleshoot it? - for me the results arent upserted.

danielstankw avatar Apr 09 '24 17:04 danielstankw

in your flow, you are using LocalAI and Azure, I'd suggest try replacing each one at at time to see which one was causing issue. Also, is it just PDF? have you tried Text file?

HenryHengZJ avatar Apr 11 '24 21:04 HenryHengZJ

@HenryHengZJ Do I need to have redis stack running in docker to use this application? I am connecting to redis that is hosted externally.

danielstankw avatar Apr 16 '24 13:04 danielstankw

Yes, can confirm this is happening for me also using the pdf loader. It seems that this is the case with some of the pdf file, not all. Found this similar issue https://github.com/FlowiseAI/Flowise/issues/2099

tiberiu89 avatar Aug 28 '24 21:08 tiberiu89