Verba: "Query failed: 'NoneType' object is not iterable" Error when starting Verba Chat

Description

Application is up and running, but Verba Chat is not working. It is showing “Something went wrong: ‘NoneType’ object is not iterable”, although Verba variables are available.

If I look at the logs, I see the following:. Included some lines above and below for context.

INFO:     127.0.0.1:64363 - "POST /api/set_config HTTP/1.1" 200 OK
INFO:     ('127.0.0.1', 64374) - "WebSocket /ws/generate_stream" [accepted]
INFO:     connection open
INFO:     127.0.0.1:64363 - "POST /api/suggestions HTTP/1.1" 200 OK
✔ Received query: What is verba?
⚠ Query failed: 'NoneType' object is not iterable
INFO:     127.0.0.1:64386 - "POST /api/query HTTP/1.1" 200 OK

Is this a bug or a feature?

  • Bug

Steps to Reproduce

Follow the steps, Screenshot 2024-05-20 at 1 20 20 AM Issue set .env and run the project.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 26 (9 by maintainers)

Most upvoted comments

Hello, I had this error but I’ve finally managed to fix it. I got it to work with OpenAI GPT3 and Ollama (llama3 and mxbai-embed-large)

The problem for me was that Verba wasn’t able to reach a LLM. For GPT3 I needed to add OPENAI_BASE_URL=https://api.openai.com/v1 to my environment.

For Ollama I found that I just hadn’t pulled the images. I had Ollama in a docker compose with weaviate and verba so had to manually pull the images. I added a persistent volume to pull into.

  ollama:
    image: ollama/ollama:latest
    volumes:
     - YOUR_DATA_DIR/ollama_data:/root/.ollama
    ports:
      - 11434:11434

Then ran

docker exec -it verba-ollama-1 ollama pull mxbai-embed-large
docker exec -it verba-ollama-1 ollama pull llama3

You could add the command directly in the docker compose yaml though.

Now I can add docs and use the chat with either model with no errors.

If this is common, maybe a validation checking if the all models needed are available would be good 😃

Thanks a lot everyone for the feedback, we’ll make sure to update the README and make the error logs more useful!

Have you tried to add documents?

Hi! @zbalsara21 and @Benniepie, you can use this PR. I think the issue is fixed with this PR. Thanks.

PR Link: https://github.com/weaviate/Verba/pull/204

@zotttttttt After embedding, it’s working. Now I can successfully load the document.

@Badhansen try clicking the greyed out button under “Select an Embedder”. That should allow you to select an embedder and should fix that issue.

I still get the Query failed: 'NoneType' object is not iterable problem even after successful embedding.

Same here.