Skip to content

[BUG]: 'SequenceIterator' object is not iterable in file recommender_system.ipynb  #1293

@hyseimide

Description

@hyseimide

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

TypeError                                 Traceback (most recent call last)
Cell In[30], [line 7](vscode-notebook-cell:?execution_count=30&line=7)
      [4](vscode-notebook-cell:?execution_count=30&line=4) search_string = "A comedy from the 1990s set in a hospital. The main characters are in their 20s and are trying to stop a vampire."
      [5](vscode-notebook-cell:?execution_count=30&line=5) results = search_for_movies(search_string)
----> [7](vscode-notebook-cell:?execution_count=30&line=7) for hits in iter(results):
      [8](vscode-notebook-cell:?execution_count=30&line=8)     for hit in hits:
      [9](vscode-notebook-cell:?execution_count=30&line=9)         print(hit.entity.get('title'))

TypeError: 'SequenceIterator' object is not iterable

Expected Behavior

Print the search result

Steps To Reproduce

Run All the code cells. The error occurred in the last code cell.

TypeError: 'SequenceIterator' object is not iterable

Software version

Milvus: 2.4.0
Server: Ubuntu 22.04
Client: PyMilvus 2.4.0
Python: 3.12.2

Anything else?

Maybe:

for hits in results:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions